| OLD | NEW |
| 1 // Copyright (c) 2011 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_PREFS_PREF_VALUE_STORE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ |
| 6 #define CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 bool PrefValueFromDefaultStore(const char* name) const; | 98 bool PrefValueFromDefaultStore(const char* name) const; |
| 99 | 99 |
| 100 // Check whether a Preference value is modifiable by the user, i.e. whether | 100 // Check whether a Preference value is modifiable by the user, i.e. whether |
| 101 // there is no higher-priority source controlling it. | 101 // there is no higher-priority source controlling it. |
| 102 bool PrefValueUserModifiable(const char* name) const; | 102 bool PrefValueUserModifiable(const char* name) const; |
| 103 | 103 |
| 104 // Check whether a Preference value is modifiable by an extension, i.e. | 104 // Check whether a Preference value is modifiable by an extension, i.e. |
| 105 // whether there is no higher-priority source controlling it. | 105 // whether there is no higher-priority source controlling it. |
| 106 bool PrefValueExtensionModifiable(const char* name) const; | 106 bool PrefValueExtensionModifiable(const char* name) const; |
| 107 | 107 |
| 108 // Update the command line PrefStore with |command_line_prefs|. |
| 109 void UpdateCommandLinePrefStore(PrefStore* command_line_prefs); |
| 110 |
| 108 private: | 111 private: |
| 109 // PrefStores must be listed here in order from highest to lowest priority. | 112 // PrefStores must be listed here in order from highest to lowest priority. |
| 110 // MANAGED_PLATFORM contains all managed preference values that are | 113 // MANAGED_PLATFORM contains all managed preference values that are |
| 111 // provided by a platform-specific policy mechanism (e.g. Windows | 114 // provided by a platform-specific policy mechanism (e.g. Windows |
| 112 // Group Policy). | 115 // Group Policy). |
| 113 // MANAGED_CLOUD contains all managed preference values supplied | 116 // MANAGED_CLOUD contains all managed preference values supplied |
| 114 // by the device management server (cloud policy). | 117 // by the device management server (cloud policy). |
| 115 // EXTENSION contains preference values set by extensions. | 118 // EXTENSION contains preference values set by extensions. |
| 116 // COMMAND_LINE contains preference values set by command-line switches. | 119 // COMMAND_LINE contains preference values set by command-line switches. |
| 117 // USER contains all user-set preference values. | 120 // USER contains all user-set preference values. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // A mapping of preference names to their registered types. | 250 // A mapping of preference names to their registered types. |
| 248 PrefTypeMap pref_types_; | 251 PrefTypeMap pref_types_; |
| 249 | 252 |
| 250 // True if not all of the PrefStores were initialized successfully. | 253 // True if not all of the PrefStores were initialized successfully. |
| 251 bool initialization_failed_; | 254 bool initialization_failed_; |
| 252 | 255 |
| 253 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); | 256 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); |
| 254 }; | 257 }; |
| 255 | 258 |
| 256 #endif // CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ | 259 #endif // CHROME_BROWSER_PREFS_PREF_VALUE_STORE_H_ |
| OLD | NEW |