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(); |