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

Unified Diff: chrome/browser/chromeos/cros_settings.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: Rebased on ToT and made clang happy. Created 9 years, 2 months 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
Index: chrome/browser/chromeos/cros_settings.h
diff --git a/chrome/browser/chromeos/cros_settings.h b/chrome/browser/chromeos/cros_settings.h
index 90c8dcd428da318b2c516d11eee0a9d1edbd932b..d27611d8b028deedf5ac9875a16629e27d48e03a 100644
--- a/chrome/browser/chromeos/cros_settings.h
+++ b/chrome/browser/chromeos/cros_settings.h
@@ -35,8 +35,7 @@ class CrosSettings : public base::NonThreadSafe {
static bool IsCrosSettings(const std::string& path);
// 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);
Denis Lagno 2011/10/04 17:01:50 AFAIU base::Values are intended to be created via
pastarmovj 2011/10/05 08:42:31 This is true because the usual pref stores take ow
Denis Lagno 2011/10/05 17:50:10 So you use const reference as a signal that owners
pastarmovj 2011/10/13 11:25:06 Actually my interface exactly mimics the interface
// Fires system setting change notification.
// TODO(pastarmovj): Consider to remove this function from the public
@@ -59,6 +58,10 @@ class CrosSettings : public base::NonThreadSafe {
void SetDouble(const std::string& path, double in_value);
void SetString(const std::string& path, const std::string& in_value);
+ // Convenience functions for manipulating lists.
+ void AppendToList(const std::string& path, const base::Value& value);
+ void RemoveFromList(const std::string& path, const base::Value& value);
+
// These are convenience forms of Get(). The value will be retrieved
// and the return value will be true if the path is valid and the value at
// the end of the path can be returned in the form specified.

Powered by Google App Engine
This is Rietveld 408576698