OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_STUB_CROS_SETTINGS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STUB_CROS_SETTINGS_PROVIDER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "chrome/browser/chromeos/cros_settings_provider.h" |
| 11 #include "chrome/browser/prefs/pref_value_map.h" |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 // CrosSettingsProvider implementation that stores settings in memory unsigned. |
| 16 class StubCrosSettingsProvider : public CrosSettingsProvider { |
| 17 public: |
| 18 StubCrosSettingsProvider(); |
| 19 virtual ~StubCrosSettingsProvider(); |
| 20 |
| 21 // CrosSettingsProvider implementation. |
| 22 virtual const base::Value* Get(const std::string& path) const OVERRIDE; |
| 23 virtual bool GetTrusted(const std::string& path, |
| 24 const base::Closure& callback) OVERRIDE; |
| 25 virtual bool HandlesSetting(const std::string& path) const OVERRIDE; |
| 26 virtual void Reload() OVERRIDE; |
| 27 |
| 28 private: |
| 29 // CrosSettingsProvider implementation: |
| 30 virtual void DoSet(const std::string& path, |
| 31 const base::Value& value) OVERRIDE; |
| 32 |
| 33 // Initializes settings to their defaults. |
| 34 void SetDefaults(); |
| 35 |
| 36 // In-memory settings storage. |
| 37 PrefValueMap values_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(StubCrosSettingsProvider); |
| 40 }; |
| 41 |
| 42 } // namespace chromeos |
| 43 |
| 44 #endif // CHROME_BROWSER_CHROMEOS_STUB_CROS_SETTINGS_PROVIDER_H_ |
OLD | NEW |