diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 20:00:06 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 20:00:06 +0000 |
commit | d4efb2e57d0f5498a1171744b31d6300d6bf9b55 (patch) | |
tree | 0b8f7db19af5f37ba9d3e467be2db99e72aa295d /chrome/browser/extensions | |
parent | 07092e70b19facd29fd1c22986b2f3ad1d6646fe (diff) | |
download | chromium_src-d4efb2e57d0f5498a1171744b31d6300d6bf9b55.zip chromium_src-d4efb2e57d0f5498a1171744b31d6300d6bf9b55.tar.gz chromium_src-d4efb2e57d0f5498a1171744b31d6300d6bf9b55.tar.bz2 |
Revert 60834 - Changed EXTENSION_UNINSTALLED notification to happen after uninstallation.
The important part is that it comes after the EXTENSION_UNLOADED
notification is sent. This makes it easier on the listeners, as they
can assume that extension notifications other than EXTENSION_UNINSTALLED
are sent for currently-installed extensions.
BUG=54415
TEST=BackgroundModeManagerTest
Review URL: http://codereview.chromium.org/3461025
TBR=akalin@chromium.org
Review URL: http://codereview.chromium.org/3525001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index d572f0f..e2e6342 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -758,11 +758,16 @@ void ExtensionsService::UninstallExtension(const std::string& extension_id, // Callers should not send us nonexistent extensions. DCHECK(extension); + // Notify interested parties that we're uninstalling this extension. + NotificationService::current()->Notify( + NotificationType::EXTENSION_UNINSTALLED, + Source<Profile>(profile_), + Details<Extension>(extension)); + // Get hold of information we need after unloading, since the extension // pointer will be invalid then. GURL extension_url(extension->url()); Extension::Location location(extension->location()); - UninstalledExtensionInfo uninstalled_extension_info(*extension); // Also copy the extension identifier since the reference might have been // obtained via Extension::id(). @@ -789,12 +794,6 @@ void ExtensionsService::UninstallExtension(const std::string& extension_id, } ClearExtensionData(extension_url); - - // Notify interested parties that we've uninstalled this extension. - NotificationService::current()->Notify( - NotificationType::EXTENSION_UNINSTALLED, - Source<Profile>(profile_), - Details<UninstalledExtensionInfo>(&uninstalled_extension_info)); } void ExtensionsService::ClearExtensionData(const GURL& extension_url) { |