Chromium Code Reviews| 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..db6002872264dbea0adfd80872efb48bc205b79f 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -932,12 +932,18 @@ void ProfileImpl::OnPrefsLoaded(bool success) { |
| // Make sure we save to disk that the session has opened. |
| prefs_->ScheduleSavePersistentPrefs(); |
| + bool extensions_disabled = |
| + (prefs_->FindPreference(prefs::kDisableExtensions) && |
| + prefs_->GetBoolean(prefs::kDisableExtensions)) || |
| + CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions); |
|
Mattias Nissler (ping if slow)
2011/09/29 12:20:07
Hm, maybe handle the switch in CommandLinePrefStor
battre
2011/09/29 14:50:18
I looked into this and decided against it: It woul
|
| + |
| // 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())); |
| + GetExtensionPrefValueMap(), |
| + extensions_disabled)); |
| ProfileDependencyManager::GetInstance()->CreateProfileServices(this, false); |