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

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

Issue 5213002: Fix for Bug 50726 "Save extension list and "winning" prefs from extensions" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Same patch but without stuff that is already included in 5204006 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 71eb5053c44eb926babf9efd5012301f89014959..66b023f768d22e08044eab776ac40cb50d89b851 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -276,6 +276,12 @@ 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());
@@ -354,6 +360,7 @@ void ProfileImpl::InitExtensions() {
this,
CommandLine::ForCurrentProcess(),
GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName),
+ extension_prefs_.get(),
true);
RegisterComponentExtensions();
« no previous file with comments | « chrome/browser/profiles/profile_impl.h ('k') | chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698