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_USER_CROS_SETTINGS_PROVIDER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_USER_CROS_SETTINGS_PROVIDER_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 #include "base/basictypes.h" | |
12 #include "base/callback.h" | |
13 #include "chrome/browser/chromeos/cros_settings_provider.h" | |
14 #include "chrome/browser/chromeos/login/signed_settings_helper.h" | |
15 | |
16 class PrefService; | |
17 | |
18 namespace base { | |
19 class ListValue; | |
20 } | |
21 | |
22 namespace chromeos { | |
23 | |
24 // CrosSettingsProvider implementation that works with SignedSettings. | |
25 // TODO(nkostylev): Rename this class to indicate that it is | |
26 // SignedSettings specific. | |
27 class UserCrosSettingsProvider : public CrosSettingsProvider { | |
28 public: | |
29 UserCrosSettingsProvider(); | |
30 virtual ~UserCrosSettingsProvider() {} | |
31 | |
32 // Registers cached users settings in preferences. | |
33 static void RegisterPrefs(PrefService* local_state); | |
34 | |
35 // Reloads values from device settings. | |
36 void Reload(); | |
37 | |
38 // CrosSettingsProvider implementation. | |
39 virtual const base::Value* Get(const std::string& path) const OVERRIDE; | |
40 virtual bool GetTrusted(const std::string& path, | |
41 const base::Closure& callback) const OVERRIDE; | |
42 virtual bool HandlesSetting(const std::string& path) const OVERRIDE; | |
43 | |
44 private: | |
45 // CrosSettingsProvider implementation. | |
46 virtual void DoSet(const std::string& path, | |
47 const base::Value& value) OVERRIDE; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(UserCrosSettingsProvider); | |
50 }; | |
51 | |
52 } // namespace chromeos | |
53 | |
54 #endif // CHROME_BROWSER_CHROMEOS_USER_CROS_SETTINGS_PROVIDER_H_ | |
OLD | NEW |