diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 19:17:59 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 19:17:59 +0000 |
commit | 94bef5ad7ddd08327f7d80d50a187c86d78fccf7 (patch) | |
tree | 580d51deda2b27cb56fdfb52d677876ba6a525ce | |
parent | acb172f61a27eefa9cbe4d69629a549e87679d02 (diff) | |
download | chromium_src-94bef5ad7ddd08327f7d80d50a187c86d78fccf7.zip chromium_src-94bef5ad7ddd08327f7d80d50a187c86d78fccf7.tar.gz chromium_src-94bef5ad7ddd08327f7d80d50a187c86d78fccf7.tar.bz2 |
Profiles: Remove orphaned notifications.
BUG=87457
TEST=none
Review URL: http://codereview.chromium.org/7532013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94727 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit.cc | 4 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/global_history_menu.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/views/omnibox/omnibox_view_views.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/omnibox/omnibox_view_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/content_settings_handler.cc | 8 | ||||
-rw-r--r-- | chrome/browser/upgrade_detector.cc | 5 | ||||
-rw-r--r-- | chrome/common/chrome_notification_types.h | 35 |
10 files changed, 3 insertions, 71 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc index 2b0c3c0..3d1d19e 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.cc +++ b/chrome/browser/autocomplete/autocomplete_edit.cc @@ -591,9 +591,7 @@ const AutocompleteResult& AutocompleteEditModel::result() const { void AutocompleteEditModel::OnSetFocus(bool control_down) { has_focus_ = true; control_key_state_ = control_down ? DOWN_WITHOUT_CHANGE : UP; - NotificationService::current()->Notify(chrome::NOTIFICATION_OMNIBOX_FOCUSED, - Source<AutocompleteEditModel>(this), - NotificationService::NoDetails()); + InstantController* instant = controller_->GetInstant(); TabContentsWrapper* tab = controller_->GetTabContentsWrapper(); if (instant && tab) diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc index be819c7..ad12a04 100644 --- a/chrome/browser/autocomplete/autocomplete_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_unittest.cc @@ -163,7 +163,7 @@ void AutocompleteProviderTest::ResetControllerWithTestProviders( // notifications. registrar_.Add(this, chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY, - NotificationService::AllSources()); + Source<AutocompleteController>(controller)); } void AutocompleteProviderTest:: diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 06d1f2c..ab8da99 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -363,11 +363,6 @@ void ChromeURLRequestContext::set_chrome_url_data_manager_backend( ChromeURLRequestContext::~ChromeURLRequestContext() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); - - NotificationService::current()->Notify( - chrome::NOTIFICATION_URL_REQUEST_CONTEXT_RELEASED, - Source<net::URLRequestContext>(this), - NotificationService::NoDetails()); } const std::string& ChromeURLRequestContext::GetUserAgent( diff --git a/chrome/browser/ui/gtk/global_history_menu.cc b/chrome/browser/ui/gtk/global_history_menu.cc index 6ac4dd8..4913435 100644 --- a/chrome/browser/ui/gtk/global_history_menu.cc +++ b/chrome/browser/ui/gtk/global_history_menu.cc @@ -283,8 +283,7 @@ void GlobalHistoryMenu::Observe(int type, const NotificationSource& source, const NotificationDetails& details) { if (type == chrome::NOTIFICATION_TOP_SITES_CHANGED) { - if (Source<history::TopSites>(source).ptr() == top_sites_) - GetTopSitesData(); + GetTopSitesData(); } else { NOTREACHED(); } diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc index c03af19..1634b97 100644 --- a/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc +++ b/chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc @@ -213,11 +213,6 @@ OmniboxViewGtk::OmniboxViewGtk( } OmniboxViewGtk::~OmniboxViewGtk() { - NotificationService::current()->Notify( - chrome::NOTIFICATION_OMNIBOX_DESTROYED, - Source<OmniboxViewGtk>(this), - NotificationService::NoDetails()); - // Explicitly teardown members which have a reference to us. Just to be safe // we want them to be destroyed before destroying any other internal state. popup_view_.reset(); diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc index 015cbbf..a17dc1c 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc @@ -154,9 +154,6 @@ OmniboxViewViews::OmniboxViewViews(AutocompleteEditController* controller, } OmniboxViewViews::~OmniboxViewViews() { - NotificationService::current()->Notify( - chrome::NOTIFICATION_OMNIBOX_DESTROYED, Source<OmniboxViewViews>(this), - NotificationService::NoDetails()); // Explicitly teardown members which have a reference to us. Just to be safe // we want them to be destroyed before destroying any other internal state. popup_view_.reset(); diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc index f7306e1..9dd25d6 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc @@ -483,10 +483,6 @@ OmniboxViewWin::OmniboxViewWin(const gfx::Font& font, } OmniboxViewWin::~OmniboxViewWin() { - NotificationService::current()->Notify( - chrome::NOTIFICATION_OMNIBOX_DESTROYED, Source<OmniboxViewWin>(this), - NotificationService::NoDetails()); - // Explicitly release the text object model now that we're done with it, and // before we free the library. If the library gets unloaded before this // released, it becomes garbage. diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc index cb4b0b6..d0d5b1b 100644 --- a/chrome/browser/ui/webui/options/content_settings_handler.cc +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc @@ -281,9 +281,6 @@ void ContentSettingsHandler::Initialize() { this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, Source<HostContentSettingsMap>(settings_map)); notification_registrar_.Add( - this, chrome::NOTIFICATION_DESKTOP_NOTIFICATION_DEFAULT_CHANGED, - NotificationService::AllSources()); - notification_registrar_.Add( this, chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED, NotificationService::AllSources()); notification_registrar_.Add( @@ -332,11 +329,6 @@ void ContentSettingsHandler::Observe(int type, break; } - case chrome::NOTIFICATION_DESKTOP_NOTIFICATION_DEFAULT_CHANGED: { - UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_NOTIFICATIONS); - break; - } - case chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED: { UpdateNotificationExceptionsView(); break; diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc index 994f75c..f4a7e68 100644 --- a/chrome/browser/upgrade_detector.cc +++ b/chrome/browser/upgrade_detector.cc @@ -41,11 +41,6 @@ UpgradeDetector::~UpgradeDetector() { void UpgradeDetector::NotifyUpgradeDetected() { upgrade_detected_time_ = base::Time::Now(); - - NotificationService::current()->Notify( - chrome::NOTIFICATION_UPGRADE_DETECTED, - Source<UpgradeDetector>(this), - NotificationService::NoDetails()); } void UpgradeDetector::NotifyUpgradeRecommended() { diff --git a/chrome/common/chrome_notification_types.h b/chrome/common/chrome_notification_types.h index eb09e53..1edb852 100644 --- a/chrome/common/chrome_notification_types.h +++ b/chrome/common/chrome_notification_types.h @@ -294,15 +294,6 @@ enum { // used. NOTIFICATION_TOP_SITES_CHANGED, - // Thumbnails--------------------------------------------------------------- - - // Sent by the ThumbnailGenerator whenever a render widget host - // updates its backing store. The source is the - // ThumbnailGenerator, and the details are the RenderWidgetHost - // that notified the ThumbnailGenerator that its backing store was - // updated. - NOTIFICATION_THUMBNAIL_GENERATOR_SNAPSHOT_CHANGED, - // Bookmarks --------------------------------------------------------------- // Sent when the starred state of a URL changes. A URL is starred if there @@ -330,11 +321,6 @@ enum { // Profile, and the details the id of the TemplateURL being removed. NOTIFICATION_TEMPLATE_URL_REMOVED, - // Notification triggered when a web application has been installed or - // uninstalled. Any application view should reload its data. The source is - // the profile. No details are provided. - NOTIFICATION_WEB_APP_INSTALL_CHANGED, - // This is sent to a pref observer when a pref is changed. The source is the // PrefService and the details a std::string of the changed path. NOTIFICATION_PREF_CHANGED, @@ -358,12 +344,6 @@ enum { // is the profile. NOTIFICATION_OMNIBOX_OPENED_URL, - // Sent by the omnibox when it is destroyed. - NOTIFICATION_OMNIBOX_DESTROYED, - - // Sent by the omnibox when it is focused. - NOTIFICATION_OMNIBOX_FOCUSED, - // Sent when the main Google URL has been updated. Some services cache // this value and need to update themselves when it changes. See // google_util::GetGoogleURLAndUpdateIfNecessary(). @@ -382,11 +362,6 @@ enum { // Shutdown ---------------------------------------------------------------- - // Sent on the browser IO thread when an net::URLRequestContext is released - // by its owning Profile. The source is a pointer to the - // net::URLRequestContext. - NOTIFICATION_URL_REQUEST_CONTEXT_RELEASED, - // Sent when WM_ENDSESSION has been received, after the browsers have been // closed but before browser process has been shutdown. The source/details // are all source and no details. @@ -630,12 +605,6 @@ enum { // Upgrade notifications --------------------------------------------------- - // Sent when Chrome detects that it has been upgraded behind the scenes. - // NOTE: The detection mechanism is asynchronous, so this event may arrive - // quite some time after the upgrade actually happened. No details are - // expected. - NOTIFICATION_UPGRADE_DETECTED, - // Sent when Chrome believes an update has been installed and available for // long enough with the user shutting down to let it take effect. See // upgrade_detector.cc for details on how long it waits. No details are @@ -696,10 +665,6 @@ enum { // TabSpecificContentSettings object, there are no details. NOTIFICATION_COLLECTED_COOKIES_SHOWN, - // Sent when the default setting for desktop notifications has changed. - // The source is the DesktopNotificationService, the details are None. - NOTIFICATION_DESKTOP_NOTIFICATION_DEFAULT_CHANGED, - // Sent when a non-default setting in the the notification content settings // map has changed. The source is the DesktopNotificationService, the // details are None. |