Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index 68ae5822feb842789917b7326b115b45becdc26e..6d74c10646a17c9896e9527e58b491d222f3a1f6 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -824,7 +824,17 @@ void ExtensionService::EnableExtension(const std::string& extension_id) { |
return; |
} |
- extension_prefs_->SetExtensionState(extension_id, Extension::ENABLED); |
+ if (extension && extension->manifest() && |
+ extension->manifest()->location() == Manifest::COMPONENT) { |
+ // Component extensions need to be put into the "ENABLED_COMPONENT", |
benwells
2014/08/12 04:17:14
Um. Hmm. ENABLED_COMPONENT feels pretty strange. D
Anand Mistry (off Chromium)
2014/08/12 05:06:42
Adding Trent since he introduced this in https://s
tapted
2014/08/12 05:39:06
Woww so long ago. That was one of my first chrome
Anand Mistry (off Chromium)
2014/08/12 07:32:10
Removed the ENABLED_COMPONENT state, but not sure
|
+ // otherwise, other things break later on |
+ // (*cough* ExtensionPrefs::GetInstalledExtensionInfo()) that rely on |
+ // component extensions being in that state. |
+ extension_prefs_->SetExtensionState(extension_id, |
+ Extension::ENABLED_COMPONENT); |
+ } else { |
+ extension_prefs_->SetExtensionState(extension_id, Extension::ENABLED); |
+ } |
extension_prefs_->ClearDisableReasons(extension_id); |
// This can happen if sync enables an extension that is not |