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

Unified Diff: chrome/browser/ui/extensions/extension_enable_flow.cc

Issue 317433003: Remove NOTIFICATION_EXTENSION_UNINSTALLED from extension_enable_flow.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/ui/extensions/extension_enable_flow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/extension_enable_flow.cc
diff --git a/chrome/browser/ui/extensions/extension_enable_flow.cc b/chrome/browser/ui/extensions/extension_enable_flow.cc
index 8b232873493deff02866eae3369cefd29854d098..be3454a04f4c0f9beab76a102f55bb32bcb817ca 100644
--- a/chrome/browser/ui/extensions/extension_enable_flow.cc
+++ b/chrome/browser/ui/extensions/extension_enable_flow.cc
@@ -116,36 +116,19 @@ void ExtensionEnableFlow::StartObserving() {
extensions::ExtensionRegistry::Get(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
content::Source<Profile>(profile_));
- registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
- content::Source<Profile>(profile_));
}
void ExtensionEnableFlow::StopObserving() {
registrar_.RemoveAll();
+ extension_registry_observer_.RemoveAll();
limasdf 2014/06/03 19:27:43 I think this is necessary. and it should be addres
}
void ExtensionEnableFlow::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_EXTENSION_LOAD_ERROR: {
- StopObserving();
- delegate_->ExtensionEnableFlowAborted(false);
- break;
- }
- case chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED: {
- const Extension* extension =
- content::Details<const Extension>(details).ptr();
- if (extension->id() == extension_id_) {
- StopObserving();
- delegate_->ExtensionEnableFlowAborted(false);
- }
- break;
- }
- default:
- NOTREACHED();
- }
+ DCHECK_EQ(chrome::NOTIFICATION_EXTENSION_LOAD_ERROR, type);
+ StopObserving();
+ delegate_->ExtensionEnableFlowAborted(false);
}
void ExtensionEnableFlow::OnExtensionLoaded(
@@ -157,6 +140,15 @@ void ExtensionEnableFlow::OnExtensionLoaded(
}
}
+void ExtensionEnableFlow::OnExtensionUninstalled(
+ content::BrowserContext* browser_context,
+ const Extension* extension) {
+ if (extension->id() == extension_id_) {
+ StopObserving();
+ delegate_->ExtensionEnableFlowAborted(false);
+ }
+}
+
void ExtensionEnableFlow::InstallUIProceed() {
ExtensionService* service =
extensions::ExtensionSystem::Get(profile_)->extension_service();
« no previous file with comments | « chrome/browser/ui/extensions/extension_enable_flow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698