OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ |
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 16 matching lines...) Expand all Loading... |
27 public ConfigurationPolicyStoreInterface { | 27 public ConfigurationPolicyStoreInterface { |
28 public: | 28 public: |
29 typedef std::set<const char*> ProxyPreferenceSet; | 29 typedef std::set<const char*> ProxyPreferenceSet; |
30 | 30 |
31 // The ConfigurationPolicyPrefStore does not take ownership of the | 31 // The ConfigurationPolicyPrefStore does not take ownership of the |
32 // passed-in |provider|. | 32 // passed-in |provider|. |
33 explicit ConfigurationPolicyPrefStore(ConfigurationPolicyProvider* provider); | 33 explicit ConfigurationPolicyPrefStore(ConfigurationPolicyProvider* provider); |
34 virtual ~ConfigurationPolicyPrefStore(); | 34 virtual ~ConfigurationPolicyPrefStore(); |
35 | 35 |
36 // PrefStore methods: | 36 // PrefStore methods: |
37 virtual PrefReadError ReadPrefs(); | 37 virtual ReadResult GetValue(const std::string& key, Value** result) const; |
| 38 |
38 virtual DictionaryValue* prefs() const { return prefs_.get(); } | 39 virtual DictionaryValue* prefs() const { return prefs_.get(); } |
39 | 40 |
40 // ConfigurationPolicyStore methods: | 41 // ConfigurationPolicyStore methods: |
41 virtual void Apply(ConfigurationPolicyType setting, Value* value); | 42 virtual void Apply(ConfigurationPolicyType setting, Value* value); |
42 | 43 |
43 // Creates a ConfigurationPolicyPrefStore that reads managed platform policy. | 44 // Creates a ConfigurationPolicyPrefStore that reads managed platform policy. |
44 static ConfigurationPolicyPrefStore* CreateManagedPlatformPolicyPrefStore(); | 45 static ConfigurationPolicyPrefStore* CreateManagedPlatformPolicyPrefStore(); |
45 | 46 |
46 // Creates a ConfigurationPolicyPrefStore that supplies policy from | 47 // Creates a ConfigurationPolicyPrefStore that supplies policy from |
47 // the device management server. | 48 // the device management server. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // unspecified map entries. Otherwise wipes all default search related | 135 // unspecified map entries. Otherwise wipes all default search related |
135 // map entries from |prefs_|. | 136 // map entries from |prefs_|. |
136 void FinalizeDefaultSearchPolicySettings(); | 137 void FinalizeDefaultSearchPolicySettings(); |
137 | 138 |
138 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore); | 139 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStore); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace policy | 142 } // namespace policy |
142 | 143 |
143 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ | 144 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_H_ |
OLD | NEW |