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

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

Issue 8568019: Introduce per-tab preferences service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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.h
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index 3002e9d38db81480ae78cf854f8ab7f3849b53cb..f51b80a50865054809e3a94b4b2378dedbea0187 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -146,6 +146,10 @@ class PrefService : public base::NonThreadSafe {
// incognito windows).
PrefService* CreateIncognitoPrefService(PrefStore* incognito_extension_prefs);
+ // Creates a per-tab copy of the pref service that shares most pref stores
+ // and allows WebKit-related preferences to be overridden on per-tab basis.
+ PrefService* CreatePrefServiceWithPerTabPrefStore();
+
virtual ~PrefService();
// Reloads the data from file. This should only be called when the importer
@@ -297,24 +301,11 @@ class PrefService : public base::NonThreadSafe {
SyncableService* GetSyncableService();
protected:
- // Construct a new pref service, specifying the pref sources as explicit
- // PrefStore pointers. This constructor is what CreatePrefService() ends up
- // calling. It's also used for unit tests.
- PrefService(PrefStore* managed_platform_prefs,
- PrefStore* managed_cloud_prefs,
- PrefStore* extension_prefs,
- PrefStore* command_line_prefs,
- PersistentPrefStore* user_prefs,
- PrefStore* recommended_platform_prefs,
- PrefStore* recommended_cloud_prefs,
- DefaultPrefStore* default_store,
+ // Construct a new pref service. This constructor is what
+ // CreateXXXPrefService() end up calling. It's also used for unit tests.
+ PrefService(PrefValueStore* pref_value_store,
bool async);
- // The PrefNotifier handles registering and notifying preference observers.
- // It is created and owned by this PrefService. Subclasses may access it for
- // unit testing.
- scoped_ptr<PrefNotifierImpl> pref_notifier_;
-
private:
class PreferencePathComparator {
public:
@@ -386,6 +377,10 @@ class PrefService : public base::NonThreadSafe {
// and owned by this PrefService. Subclasses may access it for unit testing.
scoped_ptr<PrefValueStore> pref_value_store_;
+ // The PrefNotifier handles registering and notifying preference observers.
+ // It is created and owned by this PrefService.
+ scoped_ptr<PrefNotifierImpl> pref_notifier_;
+
// Pref Stores and profile that we passed to the PrefValueStore.
scoped_refptr<PersistentPrefStore> user_pref_store_;
scoped_refptr<DefaultPrefStore> default_store_;

Powered by Google App Engine
This is Rietveld 408576698