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 cc15f2fe1e72d7b06be4e6ac720604b6bd8fda31..9284acf304e21f19fe33b3fa9339f3002244c379 100644 |
| --- a/chrome/browser/chromeos/cros_settings.h |
| +++ b/chrome/browser/chromeos/cros_settings.h |
| @@ -14,17 +14,17 @@ |
| #include "base/observer_list.h" |
| #include "base/threading/non_thread_safe.h" |
| #include "chrome/browser/chromeos/cros_settings_names.h" |
| +#include "chrome/browser/chromeos/cros_settings_provider.h" |
| #include "content/common/notification_observer.h" |
| namespace base { |
| template <typename T> struct DefaultLazyInstanceTraits; |
| class Value; |
| +class ListValue; |
|
Mattias Nissler (ping if slow)
2011/09/26 17:26:37
alphabetize
pastarmovj
2011/09/29 15:15:03
Done. Sorry about that I went for the logical orde
|
| } |
| namespace chromeos { |
| -class CrosSettingsProvider; |
| - |
| // A class manages per-device/global settings. |
| class CrosSettings : public base::NonThreadSafe { |
| public: |
| @@ -39,12 +39,25 @@ class CrosSettings : public base::NonThreadSafe { |
| void Set(const std::string& path, base::Value* in_value); |
| // Fires system setting change notification. |
| + // TODO(pastarmovj): Consider to remove this function from the public i-face. |
|
Mattias Nissler (ping if slow)
2011/09/26 17:26:37
spell it out, please.
pastarmovj
2011/09/29 15:15:03
Done. You are aware that you made me line break ri
|
| void FireObservers(const char* path); |
| // Gets settings value of given |path| to |out_value|. |
|
Mattias Nissler (ping if slow)
2011/09/26 17:26:37
comment outdated.
pastarmovj
2011/09/29 15:15:03
Not only the comment is outdated the whole functio
|
| + const base::Value* HasPref(const std::string& path) const; |
|
Mattias Nissler (ping if slow)
2011/09/26 17:26:37
shouldn't this rather return bool? Then again, if
pastarmovj
2011/09/29 15:15:03
Done.
|
| + |
| + // Gets settings value of given |path| to |out_value|. |
| + const base::Value* GetPref(const std::string& path) const; |
| + |
| + // Gets settings value of given |path| to |out_value|. |
| // Note that the caller owns |out_value| returned. |
| bool Get(const std::string& path, base::Value** out_value) const; |
|
Mattias Nissler (ping if slow)
2011/09/26 17:26:37
Why is there both Get() and GetPref()?
pastarmovj
2011/09/29 15:15:03
Get is what UI used to get Pref Dictionaries whapp
|
| + // Gets settings value of given |path| from the trusted store. It will call |
| + // the |callback| function with the value of the setting or NULL if it could |
| + // not be retrieved. |
| + bool GetTrusted(const std::string& path, |
| + const base::Closure& callback) const; |
| + |
| // Convenience forms of Set(). These methods will replace any existing |
| // value at that path, even if it has a different type. |
| void SetBoolean(const std::string& path, bool in_value); |
| @@ -59,6 +72,8 @@ class CrosSettings : public base::NonThreadSafe { |
| bool GetInteger(const std::string& path, int* out_value) const; |
| bool GetDouble(const std::string& path, double* out_value) const; |
| bool GetString(const std::string& path, std::string* out_value) const; |
| + bool GetList(const std::string& path, |
| + const base::ListValue** out_value) const; |
| // adding/removing of providers |
| bool AddSettingsProvider(CrosSettingsProvider* provider); |