Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4174)

Unified Diff: chrome/browser/chromeos/cros_settings_provider.h

Issue 8091002: PART2: Make SignedSettings use proper Value types instead of string all around the place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the nits and rebased on ToT (which now has PART1 in). Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros_settings.cc ('k') | chrome/browser/chromeos/cros_settings_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros_settings_provider.h
diff --git a/chrome/browser/chromeos/cros_settings_provider.h b/chrome/browser/chromeos/cros_settings_provider.h
index e5012c346ca567b9eb761c77961a8e9446058a2a..c050092b22543076dd79392c880f6bccc48c1c29 100644
--- a/chrome/browser/chromeos/cros_settings_provider.h
+++ b/chrome/browser/chromeos/cros_settings_provider.h
@@ -20,14 +20,15 @@ class CrosSettingsProvider {
virtual ~CrosSettingsProvider() {}
// Sets |in_value| to given |path| in cros settings.
- // Note that this takes ownership of |in_value|.
- void Set(const std::string& path, base::Value* in_value);
+ void Set(const std::string& path, const base::Value& in_value);
// Gets settings value of given |path| to |out_value|.
virtual const base::Value* Get(const std::string& path) const = 0;
- // Starts a fetch from the trusted store for the value of |path|. It will
- // call the |callback| function upon completion.
+ // Starts a fetch from the trusted store for the value of |path| if not loaded
+ // yet. It will call the |callback| function upon completion if a new fetch
+ // was needed in which case the return value is false. Else it will return
+ // true and won't call the |callback|.
virtual bool GetTrusted(const std::string& path,
const base::Closure& callback) const = 0;
@@ -36,7 +37,8 @@ class CrosSettingsProvider {
private:
// Does the real job for Set().
- virtual void DoSet(const std::string& path, base::Value* in_value) = 0;
+ virtual void DoSet(const std::string& path,
+ const base::Value& in_value) = 0;
};
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/cros_settings.cc ('k') | chrome/browser/chromeos/cros_settings_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698