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

Side by Side Diff: components/prefs/pref_value_store.h

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/prefs/pref_value_map.h ('k') | components/prefs/prefs.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 5 #ifndef BASE_PREFS_PREF_VALUE_STORE_H_
6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 6 #define BASE_PREFS_PREF_VALUE_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "components/prefs/base_prefs_export.h" 16 #include "components/prefs/base_prefs_export.h"
17 #include "components/prefs/pref_store.h" 17 #include "components/prefs/pref_store.h"
18 18
19 class PrefNotifier; 19 class PrefNotifier;
20 class PrefStore; 20 class PrefStore;
21 21
22 // The PrefValueStore manages various sources of values for Preferences 22 // The PrefValueStore manages various sources of values for Preferences
23 // (e.g., configuration policies, extensions, and user settings). It returns 23 // (e.g., configuration policies, extensions, and user settings). It returns
24 // the value of a Preference from the source with the highest priority, and 24 // the value of a Preference from the source with the highest priority, and
25 // allows setting user-defined values for preferences that are not managed. 25 // allows setting user-defined values for preferences that are not managed.
26 // 26 //
27 // Unless otherwise explicitly noted, all of the methods of this class must 27 // Unless otherwise explicitly noted, all of the methods of this class must
28 // be called on the UI thread. 28 // be called on the UI thread.
29 class COMPONENTS_PREFS_EXPORT PrefValueStore { 29 class BASE_PREFS_EXPORT PrefValueStore {
30 public: 30 public:
31 typedef base::Callback<void(const std::string&)> PrefChangedCallback; 31 typedef base::Callback<void(const std::string&)> PrefChangedCallback;
32 32
33 // In decreasing order of precedence: 33 // In decreasing order of precedence:
34 // |managed_prefs| contains all preferences from mandatory policies. 34 // |managed_prefs| contains all preferences from mandatory policies.
35 // |supervised_user_prefs| contains all preferences from supervised user 35 // |supervised_user_prefs| contains all preferences from supervised user
36 // settings, i.e. settings configured for a supervised user by their 36 // settings, i.e. settings configured for a supervised user by their
37 // custodian. 37 // custodian.
38 // |extension_prefs| contains preference values set by extensions. 38 // |extension_prefs| contains preference values set by extensions.
39 // |command_line_prefs| contains preference values set by command-line 39 // |command_line_prefs| contains preference values set by command-line
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 // A mapping of preference names to their registered types. 251 // A mapping of preference names to their registered types.
252 PrefTypeMap pref_types_; 252 PrefTypeMap pref_types_;
253 253
254 // True if not all of the PrefStores were initialized successfully. 254 // True if not all of the PrefStores were initialized successfully.
255 bool initialization_failed_; 255 bool initialization_failed_;
256 256
257 DISALLOW_COPY_AND_ASSIGN(PrefValueStore); 257 DISALLOW_COPY_AND_ASSIGN(PrefValueStore);
258 }; 258 };
259 259
260 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 260 #endif // BASE_PREFS_PREF_VALUE_STORE_H_
OLDNEW
« no previous file with comments | « components/prefs/pref_value_map.h ('k') | components/prefs/prefs.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698