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

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

Issue 7867044: PART1: Initiated the SignedSettings refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments from Chris and rebased to ToT to get it running on the try servers again. 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 cc15f2fe1e72d7b06be4e6ac720604b6bd8fda31..efa283f2d0f32d09a8d8c2d26e16de4611a18cbb 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 ListValue;
class Value;
}
namespace chromeos {
-class CrosSettingsProvider;
-
// A class manages per-device/global settings.
class CrosSettings : public base::NonThreadSafe {
public:
@@ -39,11 +39,20 @@ 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
+ // interface.
void FireObservers(const char* path);
// 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;
+ const base::Value* GetPref(const std::string& path) const;
+
Mattias Nissler (ping if slow) 2011/10/13 13:41:06 nit: remove extra blank line.
pastarmovj 2011/10/26 15:43:19 Done.
+
+ // 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 win't call the |callback|.
Mattias Nissler (ping if slow) 2011/10/13 13:41:06 nit: s/win't/won't/
pastarmovj 2011/10/26 15:43:19 Done.
+ 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.
@@ -59,6 +68,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);

Powered by Google App Engine
This is Rietveld 408576698