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

Unified Diff: chrome/browser/browser.cc

Issue 165414: Disable an extension when it is upgraded to a version that requires more (Closed)
Patch Set: more comments Created 11 years, 4 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/app/generated_resources.grd ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 81830901b3980e33c9b10afb9b29360adda7fbd7..547846493b8a01f903bc825c5af928df13240057 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/download/download_started_animation.h"
+#include "chrome/browser/extensions/extension_disabled_infobar_delegate.h"
#include "chrome/browser/find_bar.h"
#include "chrome/browser/find_bar_controller.h"
#include "chrome/browser/location_bar.h"
@@ -188,6 +189,8 @@ Browser::Browser(Type type, Profile* profile)
registrar_.Add(this, NotificationType::SSL_VISIBLE_STATE_CHANGED,
NotificationService::AllSources());
+ registrar_.Add(this, NotificationType::EXTENSION_UPDATE_DISABLED,
+ NotificationService::AllSources());
registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
@@ -2079,6 +2082,14 @@ void Browser::Observe(NotificationType type,
UpdateToolbar(false);
break;
+ case NotificationType::EXTENSION_UPDATE_DISABLED: {
+ // Show the UI.
+ ExtensionsService* service = Source<ExtensionsService>(source).ptr();
+ Extension* extension = Details<Extension>(details).ptr();
+ ShowExtensionDisabledUI(service, profile_, extension);
+ break;
+ }
+
case NotificationType::EXTENSION_UNLOADED: {
// Close any tabs from the unloaded extension.
Extension* extension = Details<Extension>(details).ptr();
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698