Chromium Code Reviews| Index: chrome/browser/chromeos/cros_settings.h |
| diff --git a/chrome/browser/chromeos/cros_settings.h b/chrome/browser/chromeos/cros_settings.h |
| index 563ee994f14b872ea655b44aeac4512734d2fd3d..b0df84e3df546055527f5dba3f82fc29950b85bb 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); |
| // Fires system setting change notification. |
| // TODO(pastarmovj): Consider to remove this function from the public |
| @@ -60,6 +59,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. |
| @@ -69,6 +72,10 @@ class CrosSettings : public base::NonThreadSafe { |
| bool GetString(const std::string& path, std::string* out_value) const; |
| bool GetList(const std::string& path, |
| const base::ListValue** out_value) const; |
|
Mattias Nissler (ping if slow)
2011/10/28 14:44:07
newline before comment
pastarmovj
2011/11/18 13:18:42
Done.
|
| + // Helper function for the whitelist op. Implemented here because we will need |
| + // this in a few places. The functions searches for |email| in the pref |path| |
| + // It will respect whitelists too so foo@bar.baz will match *@bar.baz too. |
|
Mattias Nissler (ping if slow)
2011/10/28 14:44:07
s/will respect/respects/
too...too?
pastarmovj
2011/11/18 13:18:42
Too...too...the train is coming :)
|
| + bool FindEmailInList(const std::string& path, const std::string& email) const; |
| // adding/removing of providers |
| bool AddSettingsProvider(CrosSettingsProvider* provider); |