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

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

Issue 5968009: Change extension unload notification to indicate updates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
Index: chrome/browser/extensions/extension_toolbar_model.cc
===================================================================
--- chrome/browser/extensions/extension_toolbar_model.cc (revision 69996)
+++ chrome/browser/extensions/extension_toolbar_model.cc (working copy)
@@ -22,8 +22,6 @@
Source<Profile>(service_->profile()));
registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
Source<Profile>(service_->profile()));
- registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED,
- Source<Profile>(service_->profile()));
registrar_.Add(this, NotificationType::EXTENSIONS_READY,
Source<Profile>(service_->profile()));
registrar_.Add(this,
@@ -96,7 +94,12 @@
if (!service_->is_ready())
return;
- const Extension* extension = Details<const Extension>(details).ptr();
+ const Extension* extension = NULL;
+ if (type == NotificationType::EXTENSION_UNLOADED) {
+ extension = Details<UnloadedExtensionInfo>(details)->extension;
+ } else {
+ extension = Details<const Extension>(details).ptr();
+ }
if (type == NotificationType::EXTENSION_LOADED) {
// We don't want to add the same extension twice. It may have already been
// added by EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED below, if the user
@@ -107,8 +110,7 @@
}
if (service_->GetBrowserActionVisibility(extension))
AddExtension(extension);
- } else if (type == NotificationType::EXTENSION_UNLOADED ||
- type == NotificationType::EXTENSION_UNLOADED_DISABLED) {
+ } else if (type == NotificationType::EXTENSION_UNLOADED) {
RemoveExtension(extension);
} else if (type ==
NotificationType::EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED) {

Powered by Google App Engine
This is Rietveld 408576698