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

Unified Diff: components/prefs/pref_value_store.cc

Issue 2860683002: WIP: Pref service: use the incognito support from Chrome
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/prefs/pref_value_store.h ('k') | components/sync_preferences/pref_service_syncable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/pref_value_store.cc
diff --git a/components/prefs/pref_value_store.cc b/components/prefs/pref_value_store.cc
index 4c7a4e5d9cf65007e4f1af49dbd6cc51316f9ca5..82091a2b7b4ee5dc4bb718ba863fd65c99beeb11 100644
--- a/components/prefs/pref_value_store.cc
+++ b/components/prefs/pref_value_store.cc
@@ -55,9 +55,9 @@ PrefValueStore::PrefValueStore(PrefStore* managed_prefs,
PrefStore* user_prefs,
PrefStore* recommended_prefs,
PrefStore* default_prefs,
- PrefNotifier* pref_notifier)
- : pref_notifier_(pref_notifier),
- initialization_failed_(false) {
+ PrefNotifier* pref_notifier,
+ PrefStore* incognito_prefs)
+ : pref_notifier_(pref_notifier), initialization_failed_(false) {
InitPrefStore(MANAGED_STORE, managed_prefs);
InitPrefStore(SUPERVISED_USER_STORE, supervised_user_prefs);
InitPrefStore(EXTENSION_STORE, extension_prefs);
@@ -65,6 +65,7 @@ PrefValueStore::PrefValueStore(PrefStore* managed_prefs,
InitPrefStore(USER_STORE, user_prefs);
InitPrefStore(RECOMMENDED_STORE, recommended_prefs);
InitPrefStore(DEFAULT_STORE, default_prefs);
+ InitPrefStore(INCOGNITO_STORE, incognito_prefs);
CheckInitializationCompleted();
}
@@ -79,7 +80,8 @@ PrefValueStore* PrefValueStore::CloneAndSpecialize(
PrefStore* user_prefs,
PrefStore* recommended_prefs,
PrefStore* default_prefs,
- PrefNotifier* pref_notifier) {
+ PrefNotifier* pref_notifier,
+ PrefStore* incognito_prefs) {
DCHECK(pref_notifier);
if (!managed_prefs)
managed_prefs = GetPrefStore(MANAGED_STORE);
@@ -95,10 +97,13 @@ PrefValueStore* PrefValueStore::CloneAndSpecialize(
recommended_prefs = GetPrefStore(RECOMMENDED_STORE);
if (!default_prefs)
default_prefs = GetPrefStore(DEFAULT_STORE);
+ if (!incognito_prefs)
+ incognito_prefs = GetPrefStore(INCOGNITO_STORE);
- return new PrefValueStore(
- managed_prefs, supervised_user_prefs, extension_prefs, command_line_prefs,
- user_prefs, recommended_prefs, default_prefs, pref_notifier);
+ return new PrefValueStore(managed_prefs, supervised_user_prefs,
+ extension_prefs, command_line_prefs, user_prefs,
+ recommended_prefs, default_prefs, pref_notifier,
+ incognito_prefs);
}
void PrefValueStore::set_callback(const PrefChangedCallback& callback) {
« no previous file with comments | « components/prefs/pref_value_store.h ('k') | components/sync_preferences/pref_service_syncable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698