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

Unified Diff: chrome/browser/prefs/pref_service_syncable.h

Issue 1332283003: Remove dependency of PrefSyncableService on PrefsTabHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable_util
Patch Set: Update PrefServiceSyncable::CreateIncognitoPrefService comment Created 5 years, 3 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: chrome/browser/prefs/pref_service_syncable.h
diff --git a/chrome/browser/prefs/pref_service_syncable.h b/chrome/browser/prefs/pref_service_syncable.h
index f94a3028bad1c9fef6cf465a0c57ee26ea712b57..a36b75096079a3b7eb73673c0a4b71140cbb0ce9 100644
--- a/chrome/browser/prefs/pref_service_syncable.h
+++ b/chrome/browser/prefs/pref_service_syncable.h
@@ -5,11 +5,14 @@
#ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_
#define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_
+#include "base/callback_forward.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_model_associator.h"
#include "chrome/browser/prefs/synced_pref_observer.h"
#include "components/pref_registry/pref_registry_syncable.h"
+class OverlayUserPrefStore;
+class PrefModelAssociatorClient;
gab 2015/09/11 12:58:32 This fwd-decl doesn't belong in this CL yet.
sdefresne 2015/09/14 13:17:26 Ack.
class PrefServiceSyncableObserver;
namespace syncer {
@@ -23,22 +26,25 @@ class PrefServiceSyncable : public PrefService {
public:
// You may wish to use PrefServiceFactory or one of its subclasses
// for simplified construction.
- PrefServiceSyncable(
- PrefNotifierImpl* pref_notifier,
- PrefValueStore* pref_value_store,
- PersistentPrefStore* user_prefs,
- user_prefs::PrefRegistrySyncable* pref_registry,
- base::Callback<void(PersistentPrefStore::PrefReadError)>
- read_error_callback,
- bool async);
+ PrefServiceSyncable(PrefNotifierImpl* pref_notifier,
+ PrefValueStore* pref_value_store,
+ PersistentPrefStore* user_prefs,
+ user_prefs::PrefRegistrySyncable* pref_registry,
+ base::Callback<void(PersistentPrefStore::PrefReadError)>
+ read_error_callback,
+ bool async);
~PrefServiceSyncable() override;
// Creates an incognito copy of the pref service that shares most pref stores
// but uses a fresh non-persistent overlay for the user pref store and an
// individual extension pref store (to cache the effective extension prefs for
- // incognito windows).
+ // incognito windows). |incognito_pref_created_cb| will be invoked with the
+ // new incognito pref store before the pref registry is created in case some
+ // of the preference need to be overriden in incognito (may be null).
PrefServiceSyncable* CreateIncognitoPrefService(
- PrefStore* incognito_extension_prefs);
+ PrefStore* incognito_extension_prefs,
+ const base::Callback<void(OverlayUserPrefStore*)>&
+ incognito_pref_created_cb);
// Returns true if preferences state has synchronized with the remote
// preferences. If true is returned it can be assumed the local preferences

Powered by Google App Engine
This is Rietveld 408576698