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

Side by Side Diff: chrome/browser/chromeos/settings/stub_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_STUB_CROS_SETTINGS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" 10 #include "chrome/browser/chromeos/settings/cros_settings_provider.h"
11 #include "chrome/browser/prefs/pref_value_map.h" 11 #include "chrome/browser/prefs/pref_value_map.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 class CrosSettings; 15 class CrosSettings;
16 16
17 // CrosSettingsProvider implementation that stores settings in memory unsigned. 17 // CrosSettingsProvider implementation that stores settings in memory unsigned.
18 class StubCrosSettingsProvider : public CrosSettingsProvider { 18 class StubCrosSettingsProvider : public CrosSettingsProvider {
19 public: 19 public:
20 explicit StubCrosSettingsProvider(const NotifyObserversCallback& notify_cb); 20 explicit StubCrosSettingsProvider(const NotifyObserversCallback& notify_cb);
21 StubCrosSettingsProvider(); 21 StubCrosSettingsProvider();
22 virtual ~StubCrosSettingsProvider(); 22 virtual ~StubCrosSettingsProvider();
23 23
24 // CrosSettingsProvider implementation. 24 // CrosSettingsProvider implementation.
25 virtual const base::Value* Get(const std::string& path) const OVERRIDE; 25 virtual const base::Value* Get(const std::string& path) const OVERRIDE;
26 virtual TrustedStatus PrepareTrustedValues( 26 virtual TrustedStatus PrepareTrustedValues(
27 const base::Closure& callback) OVERRIDE; 27 const base::Closure& callback) OVERRIDE;
28 virtual bool HandlesSetting(const std::string& path) const OVERRIDE; 28 virtual bool HandlesSetting(const std::string& path) const OVERRIDE;
29 virtual void Reload() OVERRIDE;
30 29
31 private: 30 private:
32 // CrosSettingsProvider implementation: 31 // CrosSettingsProvider implementation:
33 virtual void DoSet(const std::string& path, 32 virtual void DoSet(const std::string& path,
34 const base::Value& value) OVERRIDE; 33 const base::Value& value) OVERRIDE;
35 34
36 // Initializes settings to their defaults. 35 // Initializes settings to their defaults.
37 void SetDefaults(); 36 void SetDefaults();
38 37
39 // In-memory settings storage. 38 // In-memory settings storage.
40 PrefValueMap values_; 39 PrefValueMap values_;
41 40
42 CrosSettings* cros_settings_; 41 CrosSettings* cros_settings_;
43 42
44 DISALLOW_COPY_AND_ASSIGN(StubCrosSettingsProvider); 43 DISALLOW_COPY_AND_ASSIGN(StubCrosSettingsProvider);
45 }; 44 };
46 45
47 } // namespace chromeos 46 } // namespace chromeos
48 47
49 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_ 48 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_STUB_CROS_SETTINGS_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698