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())); |