Index: chrome/browser/profile_impl.cc |
diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc |
index 8b62962ee07cfb12dc35cca2d93259779650d27c..7c2c10f1965d7c7705f948343ba3090f632286b9 100644 |
--- a/chrome/browser/profile_impl.cc |
+++ b/chrome/browser/profile_impl.cc |
@@ -265,7 +265,8 @@ ProfileImpl::ProfileImpl(const FilePath& path) |
#if defined(OS_WIN) |
checked_instant_promo_(false), |
#endif |
- shutdown_session_service_(false) { |
+ shutdown_session_service_(false), |
+ tmp_extension_prefs_(NULL) { |
DCHECK(!path.empty()) << "Using an empty path will attempt to write " << |
"profile files to the root directory!"; |
create_session_service_timer_.Start( |
@@ -278,6 +279,12 @@ ProfileImpl::ProfileImpl(const FilePath& path) |
pref_change_registrar_.Add(prefs::kEnableSpellCheck, this); |
pref_change_registrar_.Add(prefs::kEnableAutoSpellCorrect, this); |
+ // Ensure that preferences set by extensions are restored in the profile |
+ // as early as possible. The constructor takes care of that. |
+ tmp_extension_prefs_.reset(new ExtensionPrefs( |
Aaron Boodman
2010/11/23 20:35:13
I think it is OK for profile to just own Extension
battre (please use the other)
2010/11/30 17:46:53
Done.
|
+ GetPrefs(), |
+ GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName))); |
+ |
// Convert active labs into switches. Modifies the current command line. |
about_flags::ConvertFlagsToSwitches(prefs, CommandLine::ForCurrentProcess()); |
@@ -387,6 +394,7 @@ void ProfileImpl::InitExtensions() { |
this, |
CommandLine::ForCurrentProcess(), |
GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), |
+ tmp_extension_prefs_.release(), |
true); |
RegisterComponentExtensions(); |