| Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| index ccd4e47f98af8e23159118778e13eec726d57d78..1e667a570a5567e423f8129658d05d3bed1a6091 100644
|
| --- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| @@ -165,6 +165,7 @@ ExtensionSettingsHandler::ExtensionSettingsHandler()
|
| warning_service_observer_(this),
|
| error_console_observer_(this),
|
| extension_prefs_observer_(this),
|
| + extension_registry_observer_(this),
|
| should_do_verification_check_(false) {
|
| }
|
|
|
| @@ -183,6 +184,7 @@ ExtensionSettingsHandler::ExtensionSettingsHandler(ExtensionService* service,
|
| warning_service_observer_(this),
|
| error_console_observer_(this),
|
| extension_prefs_observer_(this),
|
| + extension_registry_observer_(this),
|
| should_do_verification_check_(false) {
|
| }
|
|
|
| @@ -651,9 +653,6 @@ void ExtensionSettingsHandler::Observe(
|
| MaybeUpdateAfterNotification();
|
| break;
|
| }
|
| - case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED:
|
| - case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
|
| - case chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED:
|
| case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED:
|
| case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED:
|
| MaybeUpdateAfterNotification();
|
| @@ -672,6 +671,25 @@ void ExtensionSettingsHandler::Observe(
|
| }
|
| }
|
|
|
| +void ExtensionSettingsHandler::OnExtensionLoaded(
|
| + content::BrowserContext* browser_context,
|
| + const Extension* extension) {
|
| + MaybeUpdateAfterNotification();
|
| +}
|
| +
|
| +void ExtensionSettingsHandler::OnExtensionUnloaded(
|
| + content::BrowserContext* browser_context,
|
| + const Extension* extension,
|
| + UnloadedExtensionInfo::Reason reason) {
|
| + MaybeUpdateAfterNotification();
|
| +}
|
| +
|
| +void ExtensionSettingsHandler::OnExtensionUninstalled(
|
| + content::BrowserContext* browser_context,
|
| + const Extension* extension) {
|
| + MaybeUpdateAfterNotification();
|
| +}
|
| +
|
| void ExtensionSettingsHandler::OnExtensionDisableReasonsChanged(
|
| const std::string& extension_id, int disable_reasons) {
|
| MaybeUpdateAfterNotification();
|
| @@ -1136,14 +1154,6 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
|
| Profile* profile = Profile::FromWebUI(web_ui());
|
|
|
| // Register for notifications that we need to reload the page.
|
| - registrar_.Add(this,
|
| - chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
|
| - content::Source<Profile>(profile));
|
| - registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
|
| - content::Source<Profile>(profile));
|
| - registrar_.Add(this,
|
| - chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
|
| - content::Source<Profile>(profile));
|
| registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
|
| content::Source<Profile>(profile));
|
| registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
|
| @@ -1161,11 +1171,12 @@ void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
|
| registrar_.Add(this,
|
| chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
|
| content::NotificationService::AllBrowserContextsAndSources());
|
| -
|
| registrar_.Add(this,
|
| content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
|
| content::NotificationService::AllBrowserContextsAndSources());
|
|
|
| + extension_registry_observer_.Add(ExtensionRegistry::Get(profile));
|
| +
|
| content::WebContentsObserver::Observe(web_ui()->GetWebContents());
|
|
|
| warning_service_observer_.Add(
|
|
|