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

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

Issue 2856083002: Pref service: support for incognito prefs (Closed)
Patch Set: Fix compilation on Windows Created 3 years, 7 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
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 COMPONENTS_PREFS_PREF_VALUE_STORE_H_
6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 6 #define COMPONENTS_PREFS_PREF_VALUE_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <type_traits> 10 #include <type_traits>
(...skipping 20 matching lines...) Expand all
31 public: 31 public:
32 typedef base::Callback<void(const std::string&)> PrefChangedCallback; 32 typedef base::Callback<void(const std::string&)> PrefChangedCallback;
33 33
34 // PrefStores must be listed here in order from highest to lowest priority. 34 // PrefStores must be listed here in order from highest to lowest priority.
35 // MANAGED contains all managed preference values that are provided by 35 // MANAGED contains all managed preference values that are provided by
36 // mandatory policies (e.g. Windows Group Policy or cloud policy). 36 // mandatory policies (e.g. Windows Group Policy or cloud policy).
37 // SUPERVISED_USER contains preferences that are valid for supervised users. 37 // SUPERVISED_USER contains preferences that are valid for supervised users.
38 // EXTENSION contains preference values set by extensions. 38 // EXTENSION contains preference values set by extensions.
39 // COMMAND_LINE contains preference values set by command-line switches. 39 // COMMAND_LINE contains preference values set by command-line switches.
40 // USER contains all user-set preference values. 40 // USER contains all user-set preference values.
41 // INCOGNITO_STORE contains preferences that were written while in incognito
Sam McNally 2017/05/10 01:22:16 Isn't that USER_STORE when running in incognito? I
42 // mode.
41 // RECOMMENDED contains all preferences that are provided by recommended 43 // RECOMMENDED contains all preferences that are provided by recommended
42 // policies. 44 // policies.
43 // DEFAULT contains all application default preference values. 45 // DEFAULT contains all application default preference values.
44 enum PrefStoreType { 46 enum PrefStoreType {
45 // INVALID_STORE is not associated with an actual PrefStore but used as 47 // INVALID_STORE is not associated with an actual PrefStore but used as
46 // an invalid marker, e.g. as a return value. 48 // an invalid marker, e.g. as a return value.
47 INVALID_STORE = -1, 49 INVALID_STORE = -1,
48 MANAGED_STORE = 0, 50 MANAGED_STORE = 0,
49 SUPERVISED_USER_STORE, 51 SUPERVISED_USER_STORE,
50 EXTENSION_STORE, 52 EXTENSION_STORE,
51 COMMAND_LINE_STORE, 53 COMMAND_LINE_STORE,
52 USER_STORE, 54 USER_STORE,
55 INCOGNITO_STORE,
53 RECOMMENDED_STORE, 56 RECOMMENDED_STORE,
54 DEFAULT_STORE, 57 DEFAULT_STORE,
55 PREF_STORE_TYPE_MAX = DEFAULT_STORE 58 PREF_STORE_TYPE_MAX = DEFAULT_STORE
56 }; 59 };
57 60
58 // In decreasing order of precedence: 61 // In decreasing order of precedence:
59 // |managed_prefs| contains all preferences from mandatory policies. 62 // |managed_prefs| contains all preferences from mandatory policies.
60 // |supervised_user_prefs| contains all preferences from supervised user 63 // |supervised_user_prefs| contains all preferences from supervised user
61 // settings, i.e. settings configured for a supervised user by their 64 // settings, i.e. settings configured for a supervised user by their
62 // custodian. 65 // custodian.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 struct hash<PrefValueStore::PrefStoreType> { 267 struct hash<PrefValueStore::PrefStoreType> {
265 size_t operator()(PrefValueStore::PrefStoreType type) const { 268 size_t operator()(PrefValueStore::PrefStoreType type) const {
266 return std::hash< 269 return std::hash<
267 std::underlying_type<PrefValueStore::PrefStoreType>::type>()(type); 270 std::underlying_type<PrefValueStore::PrefStoreType>::type>()(type);
268 } 271 }
269 }; 272 };
270 273
271 } // namespace std 274 } // namespace std
272 275
273 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_ 276 #endif // COMPONENTS_PREFS_PREF_VALUE_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698