| Index: chrome/browser/profile_impl.cc
|
| diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc
|
| index 02f1a2e6bbf6f95343ee5916e3ddd2a8aba9c73c..7f4281381cd5f3eba94cbf636c1a9ac2699cd890 100644
|
| --- a/chrome/browser/profile_impl.cc
|
| +++ b/chrome/browser/profile_impl.cc
|
| @@ -261,7 +261,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(
|
| @@ -274,6 +275,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(
|
| + GetPrefs(),
|
| + GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName)));
|
| +
|
| // Convert active labs into switches. Modifies the current command line.
|
| about_flags::ConvertFlagsToSwitches(prefs, CommandLine::ForCurrentProcess());
|
|
|
| @@ -383,6 +390,7 @@ void ProfileImpl::InitExtensions() {
|
| this,
|
| CommandLine::ForCurrentProcess(),
|
| GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName),
|
| + tmp_extension_prefs_.release(),
|
| true);
|
|
|
| RegisterComponentExtensions();
|
|
|