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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 10912105: Allow chrome.management.setEnabled() to re-enable crashed extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/extensions/api/management/management_api_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 354a661b1e95d9ab7c56e1e8c87acae1218fdf22..f30f6c7925607f35bbbc89e1887ab7ea93d74146 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -897,14 +897,15 @@ void ExtensionService::DisableExtension(
if (!extension)
return;
- // Move it over to the disabled list.
+ // Move it over to the disabled list. Don't send a second unload notification
+ // for terminated extensions being disabled.
disabled_extensions_.Insert(make_scoped_refptr(extension));
- if (extensions_.Contains(extension->id()))
+ if (extensions_.Contains(extension->id())) {
extensions_.Remove(extension->id());
- else
+ NotifyExtensionUnloaded(extension, extension_misc::UNLOAD_REASON_DISABLE);
+ } else {
terminated_extensions_.Remove(extension->id());
-
- NotifyExtensionUnloaded(extension, extension_misc::UNLOAD_REASON_DISABLE);
+ }
SyncExtensionChangeIfNeeded(*extension);
« no previous file with comments | « chrome/browser/extensions/api/management/management_api_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698