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

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

Issue 9015012: Get rid of trivial IncognitoUserPrefStore and PerTabUserPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved overlay prefs registration code to prefs_tab_helper Created 8 years, 12 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.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 215fbd3bbf91b5c7300260a31899ee0d2c81bfe8..c455c0468bd37ed5894c485b9b3b437f2bb6562e 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -24,13 +24,14 @@
#include "chrome/browser/policy/configuration_policy_pref_store.h"
#include "chrome/browser/prefs/command_line_pref_store.h"
#include "chrome/browser/prefs/default_pref_store.h"
-#include "chrome/browser/prefs/incognito_user_pref_store.h"
-#include "chrome/browser/prefs/per_tab_user_pref_store.h"
+#include "chrome/browser/prefs/overlay_user_pref_store.h"
#include "chrome/browser/prefs/pref_model_associator.h"
#include "chrome/browser/prefs/pref_notifier_impl.h"
#include "chrome/browser/prefs/pref_value_store.h"
+#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "chrome/browser/ui/profile_error_dialog.h"
#include "chrome/common/json_pref_store.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -180,8 +181,9 @@ PrefService* PrefService::CreatePrefService(const FilePath& pref_filename,
PrefService* PrefService::CreateIncognitoPrefService(
PrefStore* incognito_extension_prefs) {
PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
- PersistentPrefStore* incognito_pref_store =
- new IncognitoUserPrefStore(user_pref_store_.get());
+ OverlayUserPrefStore* incognito_pref_store =
+ new OverlayUserPrefStore(user_pref_store_.get());
+ PrefsTabHelper::InitIncognitoUserPrefStore(incognito_pref_store);
return new PrefService(
pref_notifier,
pref_value_store_->CloneAndSpecialize(
@@ -203,8 +205,9 @@ PrefService* PrefService::CreateIncognitoPrefService(
PrefService* PrefService::CreatePrefServiceWithPerTabPrefStore() {
PrefNotifierImpl* pref_notifier = new PrefNotifierImpl();
- PersistentPrefStore* per_tab_pref_store =
- new PerTabUserPrefStore(user_pref_store_.get());
+ OverlayUserPrefStore* per_tab_pref_store =
+ new OverlayUserPrefStore(user_pref_store_.get());
+ PrefsTabHelper::InitPerTabUserPrefStore(per_tab_pref_store);
DefaultPrefStore* default_store = new DefaultPrefStore();
return new PrefService(
pref_notifier,

Powered by Google App Engine
This is Rietveld 408576698