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

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

Issue 8060017: Ensure that --disable-extensions disables extension prefs from being enacted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split ExtensionPrefs constructor into constructor and Init function Created 9 years, 3 months 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 481b2ef05b6efca8ab25a49e676b5e1ed18c2cb6..466e453643e360de2c0a5a6574cbf6a3054845bd 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -932,12 +932,17 @@ void ProfileImpl::OnPrefsLoaded(bool success) {
// Make sure we save to disk that the session has opened.
prefs_->ScheduleSavePersistentPrefs();
+ bool extensions_disabled =
+ prefs_->GetBoolean(prefs::kDisableExtensions) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions);
+
// 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(ExtensionService::kInstallDirectoryName),
GetExtensionPrefValueMap()));
+ extension_prefs_->Init(extensions_disabled);
ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false);

Powered by Google App Engine
This is Rietveld 408576698