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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespaces + fixes for trybot Created 10 years 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/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 436727bb3f21c9e372a3ae01ae88941ba20d9f94..6d133e6501330674e0449f9f7eb04784527657a6 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -658,10 +658,15 @@ net::TransportSecurityState*
PrefService* ProfileImpl::GetPrefs() {
if (!prefs_.get()) {
- ExtensionPrefStore* extension_pref_store = new ExtensionPrefStore;
+ scoped_refptr<ExtensionPrefStore> extension_pref_store(
+ new ExtensionPrefStore);
+ scoped_refptr<ExtensionPrefStore> incognito_extension_pref_store(
+ new ExtensionPrefStore);
prefs_.reset(PrefService::CreatePrefService(GetPrefFilePath(),
extension_pref_store,
GetOriginalProfile()));
+ incognito_prefs_.reset(
+ prefs_->CreateIncognitoPrefService(incognito_extension_pref_store));
// The Profile class and ProfileManager class may read some prefs so
// register known prefs as soon as possible.
@@ -679,10 +684,13 @@ PrefService* ProfileImpl::GetPrefs() {
// Ensure that preferences set by extensions are restored in the profile
// as early as possible. The constructor takes care of that.
+
extension_prefs_.reset(new ExtensionPrefs(
prefs_.get(),
+ incognito_prefs_.get(),
GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
- extension_pref_store));
+ extension_pref_store,
+ incognito_extension_pref_store));
DCHECK(!net_pref_observer_.get());
net_pref_observer_.reset(new NetPrefObserver(prefs_.get()));

Powered by Google App Engine
This is Rietveld 408576698