summaryrefslogtreecommitdiffstats
path: root/chrome/browser/prefs/pref_service_syncable.h
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2015-09-14 11:12:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-14 18:12:47 +0000
commit0b1722f004e4424b18585a29234408b7112815cf (patch)
tree89a425ecdb7cc66d3c6cfd782d3d93b8245ceaaf /chrome/browser/prefs/pref_service_syncable.h
parentd12a62df87f73b6ee73c0a0169c9f2716dd4ee17 (diff)
downloadchromium_src-0b1722f004e4424b18585a29234408b7112815cf.zip
chromium_src-0b1722f004e4424b18585a29234408b7112815cf.tar.gz
chromium_src-0b1722f004e4424b18585a29234408b7112815cf.tar.bz2
Remove dependency of PrefSyncableService on PrefsTabHelper.
In preparation of the componentization of PrefSyncableService (with the goal of sharing the code on iOS), remove the dependency on PrefsTabHelper by passing a list of preferences to register as overlaid. Add a helper method in chrome/browser/prefspref_service_syncable_util.cc to pass the list of preferences previously registered in PrefsTabHelper. Remove the method PrefsTabHelper::InitIncognitoUserPrefStore(). BUG=522536 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1332283003 Cr-Commit-Position: refs/heads/master@{#348656}
Diffstat (limited to 'chrome/browser/prefs/pref_service_syncable.h')
-rw-r--r--chrome/browser/prefs/pref_service_syncable.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/chrome/browser/prefs/pref_service_syncable.h b/chrome/browser/prefs/pref_service_syncable.h
index f94a302..d37b616 100644
--- a/chrome/browser/prefs/pref_service_syncable.h
+++ b/chrome/browser/prefs/pref_service_syncable.h
@@ -5,6 +5,9 @@
#ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_
#define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_
+#include <vector>
+
+#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"
@@ -23,22 +26,23 @@ 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). |overlay_pref_names| is a list of preference names
+ // whose changes will not be persisted by the returned incognito pref service.
PrefServiceSyncable* CreateIncognitoPrefService(
- PrefStore* incognito_extension_prefs);
+ PrefStore* incognito_extension_pref_store,
+ const std::vector<const char*>& overlay_pref_names);
// Returns true if preferences state has synchronized with the remote
// preferences. If true is returned it can be assumed the local preferences