buffet: Use DictionaryValue in StorageInterface
It is used to store dictionaries only.
BUG=none
TEST='FEATURES=test emerge-gizmo buffet'
Change-Id: Ic85f77a3d31853bf8ed244d7f58264e9c809f666
Reviewed-on: https://chromium-review.googlesource.com/271301
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/buffet/storage_interface.h b/buffet/storage_interface.h
index 4f05235..d36e56d 100644
--- a/buffet/storage_interface.h
+++ b/buffet/storage_interface.h
@@ -15,16 +15,14 @@
// the details of this storage behind an interface for test purposes.
class StorageInterface {
public:
- // Load the device registration configuration from storage.
- // If it fails (e.g. the storage container [file?] doesn't exist), then
- // it returns empty unique_ptr (aka nullptr).
- virtual std::unique_ptr<base::Value> Load() = 0;
+ // Load the dictionary from storage. If it fails (e.g. the storage container
+ // [file?] doesn't exist), then it returns empty unique_ptr (aka nullptr).
+ virtual std::unique_ptr<base::DictionaryValue> Load() = 0;
- // Save the device registration configuration to storage.
- // If saved successfully, returns true. Could fail when writing to
- // physical storage like file system for various reasons (out of disk space,
- // access permissions, etc).
- virtual bool Save(const base::Value& config) = 0;
+ // Save the dictionary to storage. If saved successfully, returns true. Could
+ // fail when writing to physical storage like file system for various reasons
+ // (out of disk space,access permissions, etc).
+ virtual bool Save(const base::DictionaryValue& config) = 0;
};
} // namespace buffet