Index: chrome/browser/extensions/extension_management_api.cc |
=================================================================== |
--- chrome/browser/extensions/extension_management_api.cc (revision 75613) |
+++ chrome/browser/extensions/extension_management_api.cc (working copy) |
@@ -37,6 +37,7 @@ |
const char kIconsKey[] = "icons"; |
const char kIdKey[] = "id"; |
const char kIsAppKey[] = "isApp"; |
+const char kIsThemeKey[] = "isTheme"; |
const char kNameKey[] = "name"; |
const char kOptionsUrlKey[] = "optionsUrl"; |
const char kPermissionsKey[] = "permissions"; |
@@ -57,6 +58,7 @@ |
DictionaryValue* info = new DictionaryValue(); |
info->SetString(kIdKey, extension.id()); |
info->SetBoolean(kIsAppKey, extension.is_app()); |
+ info->SetBoolean(kIsThemeKey, extension.is_theme()); |
info->SetString(kNameKey, extension.name()); |
info->SetBoolean(kEnabledKey, enabled); |
info->SetString(kVersionKey, extension.VersionString()); |
@@ -220,11 +222,6 @@ |
return true; |
} |
-// static |
-ExtensionManagementEventRouter* ExtensionManagementEventRouter::GetInstance() { |
- return Singleton<ExtensionManagementEventRouter>::get(); |
-} |
- |
ExtensionManagementEventRouter::ExtensionManagementEventRouter() {} |
ExtensionManagementEventRouter::~ExtensionManagementEventRouter() {} |
@@ -278,7 +275,14 @@ |
} else { |
const Extension* extension = NULL; |
if (event_name == events::kOnExtensionDisabled) { |
- extension = Details<UnloadedExtensionInfo>(details)->extension; |
+ UnloadedExtensionInfo* info = |
+ Details<UnloadedExtensionInfo>(details).ptr(); |
+ // If the extension was already disabled, we don't want to send another |
+ // notification about it. |
+ if (info->already_disabled) |
+ return; |
+ |
+ extension = info->extension; |
} else { |
extension = Details<const Extension>(details).ptr(); |
} |