Revisit the simple_key_value_store into a class.
The simple_key_value_store was implemented as two separated functions
to parse and assemble a string containing several lines of key=value
pairs. The representation of that was passed to the caller as a
map<string, string> who would use the map operations to modify it.
Also, the inteded use for these strings was to parse and write text
files on the filesystem.
This key=value store is used to store strings and boolean values,
and will be reused for the policy manager config provider.
This patch reworks those functions as a class and adds support for
reading and writing boolean values and does the file read and write
operations as well.
BUG=chromium:359674
TEST=Unittest extended.
Change-Id: I4890c4a4ca81c1a4857e9893ea827c3fa7815aab
Reviewed-on: https://chromium-review.googlesource.com/195489
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
5 files changed