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

Side by Side Diff: chrome/browser/chromeos/settings/cros_settings_provider.h

Issue 10832035: Switch from SignedSettings to DeviceSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // are trusted during the current loop cycle. Otherwise returns 51 // are trusted during the current loop cycle. Otherwise returns
52 // TEMPORARILY_UNTRUSTED, and |callback| will be invoked later when trusted 52 // TEMPORARILY_UNTRUSTED, and |callback| will be invoked later when trusted
53 // values become available, PrepareTrustedValues() should be tried again in 53 // values become available, PrepareTrustedValues() should be tried again in
54 // that case. Returns PERMANENTLY_UNTRUSTED if a permanent error has occurred. 54 // that case. Returns PERMANENTLY_UNTRUSTED if a permanent error has occurred.
55 virtual TrustedStatus PrepareTrustedValues( 55 virtual TrustedStatus PrepareTrustedValues(
56 const base::Closure& callback) = 0; 56 const base::Closure& callback) = 0;
57 57
58 // Gets the namespace prefix provided by this provider. 58 // Gets the namespace prefix provided by this provider.
59 virtual bool HandlesSetting(const std::string& path) const = 0; 59 virtual bool HandlesSetting(const std::string& path) const = 0;
60 60
61 // Reloads the caches if the provider has any.
62 virtual void Reload() = 0;
63
64 void SetNotifyObserversCallback(const NotifyObserversCallback& notify_cb); 61 void SetNotifyObserversCallback(const NotifyObserversCallback& notify_cb);
65 62
66 protected: 63 protected:
67 // Notifies the observers about a setting change. 64 // Notifies the observers about a setting change.
68 void NotifyObservers(const std::string& path); 65 void NotifyObservers(const std::string& path);
69 66
70 private: 67 private:
71 // Does the real job for Set(). 68 // Does the real job for Set().
72 virtual void DoSet(const std::string& path, 69 virtual void DoSet(const std::string& path,
73 const base::Value& in_value) = 0; 70 const base::Value& in_value) = 0;
74 71
75 // Callback used to notify about setting changes. 72 // Callback used to notify about setting changes.
76 NotifyObserversCallback notify_cb_; 73 NotifyObserversCallback notify_cb_;
77 }; 74 };
78 75
79 } // namespace chromeos 76 } // namespace chromeos
80 77
81 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_PROVIDER_H_ 78 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698