diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-13 22:22:23 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-13 22:22:23 +0000 |
commit | 8b280303f86249ce8d13916fcda774a3129ac9ac (patch) | |
tree | f015f72f91927f0651cfcf1b2d5123ae5de89154 /chrome/browser/notifications | |
parent | c08950d205ff5366e6e26059cd6568cb89b28c90 (diff) | |
download | chromium_src-8b280303f86249ce8d13916fcda774a3129ac9ac.zip chromium_src-8b280303f86249ce8d13916fcda774a3129ac9ac.tar.gz chromium_src-8b280303f86249ce8d13916fcda774a3129ac9ac.tar.bz2 |
Fix some AllSources observers of EXTENSION_UNLOADED.
Most such observers use it to remove state they are tracking about particular extensions. extension_menu_manager should be okay even without this. desktop_notification_service might have had subtle wrongness.
BUG=99391
TEST=existing tests
Review URL: http://codereview.chromium.org/8253005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r-- | chrome/browser/notifications/desktop_notification_service.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc index 09451ed..3f77f43 100644 --- a/chrome/browser/notifications/desktop_notification_service.cc +++ b/chrome/browser/notifications/desktop_notification_service.cc @@ -226,7 +226,7 @@ DesktopNotificationService::~DesktopNotificationService() { void DesktopNotificationService::StartObserving() { if (!profile_->IsOffTheRecord()) { notification_registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, - NotificationService::AllSources()); + Source<Profile>(profile_)); } notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, Source<Profile>(profile_)); @@ -261,14 +261,14 @@ void DesktopNotificationService::DenyPermission(const GURL& origin) { void DesktopNotificationService::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { - if (chrome::NOTIFICATION_EXTENSION_UNLOADED == type) { + if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { // Remove all notifications currently shown or queued by the extension // which was unloaded. const Extension* extension = Details<UnloadedExtensionInfo>(details)->extension; if (extension) ui_manager_->CancelAllBySourceOrigin(extension->url()); - } else if (chrome::NOTIFICATION_PROFILE_DESTROYED == type) { + } else if (type == chrome::NOTIFICATION_PROFILE_DESTROYED) { StopObserving(); } } |