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

Unified Diff: components/sync_preferences/pref_service_syncable.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
Index: components/sync_preferences/pref_service_syncable.cc
diff --git a/components/sync_preferences/pref_service_syncable.cc b/components/sync_preferences/pref_service_syncable.cc
index ac32f54d0f78a5c43a2394143e1115544a715f79..7e05de9aead33b8c6a7c6c83c7afc6134f59e31b 100644
--- a/components/sync_preferences/pref_service_syncable.cc
+++ b/components/sync_preferences/pref_service_syncable.cc
@@ -68,34 +68,6 @@ PrefServiceSyncable::~PrefServiceSyncable() {
user_prefs::PrefRegistrySyncable::SyncableRegistrationCallback());
}
-PrefServiceSyncable* PrefServiceSyncable::CreateIncognitoPrefService(
- PrefStore* incognito_extension_pref_store,
- const std::vector<const char*>& overlay_pref_names) {
- pref_service_forked_ = true;
- PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
- OverlayUserPrefStore* incognito_pref_store =
- new OverlayUserPrefStore(user_pref_store_.get());
- for (const char* overlay_pref_name : overlay_pref_names)
- incognito_pref_store->RegisterOverlayPref(overlay_pref_name);
-
- scoped_refptr<user_prefs::PrefRegistrySyncable> forked_registry =
- static_cast<user_prefs::PrefRegistrySyncable*>(pref_registry_.get())
- ->ForkForIncognito();
- PrefServiceSyncable* incognito_service = new PrefServiceSyncable(
- pref_notifier,
- pref_value_store_->CloneAndSpecialize(NULL, // managed
- NULL, // supervised_user
- incognito_extension_pref_store,
- NULL, // command_line_prefs
- incognito_pref_store,
- NULL, // recommended
- forked_registry->defaults().get(),
- pref_notifier),
- incognito_pref_store, forked_registry.get(),
- pref_sync_associator_.client(), read_error_callback_, false);
- return incognito_service;
-}
-
bool PrefServiceSyncable::IsSyncing() {
return pref_sync_associator_.models_associated();
}
« no previous file with comments | « components/sync_preferences/pref_service_syncable.h ('k') | components/sync_preferences/pref_service_syncable_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698