Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index 7913da19f7dfc92f7e79be86df78b6c48cf28fe9..20c8166448dc43b229f33ef28d5538ed58372aa8 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -35,6 +35,7 @@ |
#include "chrome/browser/extensions/extension_info_map.h" |
#include "chrome/browser/extensions/extension_event_router.h" |
#include "chrome/browser/extensions/extension_message_service.h" |
+#include "chrome/browser/extensions/extension_pref_store.h" |
#include "chrome/browser/extensions/extension_process_manager.h" |
#include "chrome/browser/extensions/extensions_service.h" |
#include "chrome/browser/extensions/user_script_master.h" |
@@ -277,12 +278,6 @@ ProfileImpl::ProfileImpl(const FilePath& path) |
pref_change_registrar_.Add(prefs::kEnableAutoSpellCorrect, this); |
pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this); |
- // 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( |
- GetPrefs(), |
- GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName))); |
- |
// Convert active labs into switches. Modifies the current command line. |
about_flags::ConvertFlagsToSwitches(prefs, CommandLine::ForCurrentProcess()); |
@@ -671,7 +666,9 @@ net::TransportSecurityState* |
PrefService* ProfileImpl::GetPrefs() { |
if (!prefs_.get()) { |
+ ExtensionPrefStore* extension_pref_store = new ExtensionPrefStore; |
prefs_.reset(PrefService::CreatePrefService(GetPrefFilePath(), |
+ extension_pref_store, |
GetOriginalProfile())); |
// The Profile class and ProfileManager class may read some prefs so |
@@ -688,6 +685,13 @@ PrefService* ProfileImpl::GetPrefs() { |
// Make sure we save to disk that the session has opened. |
prefs_->ScheduleSavePersistentPrefs(); |
+ // 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(), |
+ GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), |
+ extension_pref_store)); |
+ |
DCHECK(!net_pref_observer_.get()); |
net_pref_observer_.reset(new NetPrefObserver(prefs_.get())); |
} |