Commit 3c6eaecd authored by erg@google.com's avatar erg@google.com

Profiles: Eliminate dead notifications.

BUG=87457
TEST=none

Review URL: http://codereview.chromium.org/7600007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95923 0039d316-1c4b-4281-b951-d872f2087c98
parent 711a4102
......@@ -218,11 +218,6 @@ bool ExternalTabContainer::Init(Profile* profile,
registrar_.Add(this, content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
NotificationService::AllSources());
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTERNAL_TAB_CREATED,
Source<NavigationController>(controller),
NotificationService::NoDetails());
TabContentsObserver::Observe(tab_contents_->tab_contents());
// Start loading initial URL
......
......@@ -1082,11 +1082,6 @@ HistoryService* ProfileImpl::GetHistoryService(ServiceAccessType sat) {
if (!history->Init(GetPath(), GetBookmarkModel()))
return NULL;
history_service_.swap(history);
// Send out the notification that the history service was created.
NotificationService::current()->
Notify(chrome::NOTIFICATION_HISTORY_CREATED, Source<Profile>(this),
Details<HistoryService>(history_service_.get()));
}
return history_service_.get();
}
......
......@@ -137,15 +137,6 @@ void WebCacheManager::ObserveStats(int renderer_id,
entry->second.liveSize = stats.liveSize;
entry->second.maxDeadCapacity = stats.maxDeadCapacity;
entry->second.minDeadCapacity = stats.minDeadCapacity;
// trigger notification
WebCache::UsageStats stats_details(stats);
// &stats_details is only valid during the notification.
// See notification_types.h.
NotificationService::current()->Notify(
chrome::NOTIFICATION_WEB_CACHE_STATS_OBSERVED,
Source<RenderProcessHost>(RenderProcessHost::FromID(renderer_id)),
Details<WebCache::UsageStats>(&stats_details));
}
void WebCacheManager::SetGlobalSizeLimit(size_t bytes) {
......
......@@ -273,11 +273,6 @@ void Bubble::InitBubble(views::Widget* parent,
#endif
GetWidget()->SetBounds(window_bounds);
// Done creating the bubble.
NotificationService::current()->Notify(
chrome::NOTIFICATION_INFO_BUBBLE_CREATED, Source<Bubble>(this),
NotificationService::NoDetails());
// Show the window.
#if defined(OS_WIN)
border_->ShowWindow(SW_SHOW);
......
......@@ -595,12 +595,6 @@ void ConstrainedWindowViews::ShowConstrainedWindow() {
}
void ConstrainedWindowViews::CloseConstrainedWindow() {
// Broadcast to all observers of NOTIFY_CWINDOW_CLOSED.
// One example of such an observer is AutomationCWindowTracker in the
// automation component.
NotificationService::current()->Notify(chrome::NOTIFICATION_CWINDOW_CLOSED,
Source<ConstrainedWindow>(this),
NotificationService::NoDetails());
Close();
}
......
......@@ -46,10 +46,6 @@ enum {
// that was closed, no details are expected.
NOTIFICATION_WINDOW_CLOSED,
// Sent when an info bubble has been created but not yet shown. The source
// is the InfoBubble.
NOTIFICATION_INFO_BUBBLE_CREATED,
// Sent when the language (English, French...) for a page has been detected.
// The details Details<std::string> contain the ISO 639-1 language code and
// the source is Source<TabContents>.
......@@ -102,10 +98,6 @@ enum {
// pointers to the old and new delegates, respectively.
NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED,
// This is sent when an externally hosted tab is created. The details
// contain the ExternalTabContainer that contains the tab
NOTIFICATION_EXTERNAL_TAB_CREATED,
// This is sent when an externally hosted tab is closed. No details are
// expected.
NOTIFICATION_EXTERNAL_TAB_CLOSED,
......@@ -128,12 +120,6 @@ enum {
// Stuff inside the tabs ---------------------------------------------------
// This message is sent after a constrained window has been closed. The
// source is a Source<ConstrainedWindow> with a pointer to the closed child
// window. (The pointer isn't usable, except for identification.) No
// details are expected.
NOTIFICATION_CWINDOW_CLOSED,
// Notification from TabContents that we have received a response from the
// renderer in response to a dom automation controller action.
NOTIFICATION_DOM_OPERATION_RESPONSE,
......@@ -158,13 +144,6 @@ enum {
// is the ExtensionInstallUI, the details are NoDetails.
NOTIFICATION_EXTENSION_WILL_SHOW_CONFIRM_DIALOG,
// Used to monitor web cache usage by notifying whenever the
// CacheManagerHost observes new UsageStats. The source will be the
// RenderProcessHost that corresponds to the new statistics. Details are a
// UsageStats object sent by the renderer, and should be copied - ptr not
// guaranteed to be valid after the notification.
NOTIFICATION_WEB_CACHE_STATS_OBSERVED,
// BackgroundContents ------------------------------------------------------
// A new background contents was opened by script. The source is the parent
......@@ -190,12 +169,6 @@ enum {
// and the details are the BackgroundContents.
NOTIFICATION_BACKGROUND_CONTENTS_TERMINATED,
// This is sent when network interception is disabled for a plugin, or the
// plugin is unloaded. This should only be sent/received on the browser IO
// thread or the plugin thread. The source is the plugin that is disabling
// interception. No details are expected.
NOTIFICATION_CHROME_PLUGIN_UNLOADED,
// This is sent when a login prompt is shown. The source is the
// Source<NavigationController> for the tab in which the prompt is shown.
// Details are a LoginNotificationDetails which provide the LoginHandler
......@@ -220,13 +193,6 @@ enum {
// History -----------------------------------------------------------------
// Sent when a history service is created on the main thread. This is sent
// after history is created, but before it has finished loading. Use
// HISTORY_LOADED is you need to know when loading has completed.
// The source is the profile that the history service belongs to, and the
// details is the pointer to the newly created HistoryService object.
NOTIFICATION_HISTORY_CREATED,
// Sent when a history service has finished loading. The source is the
// profile that the history service belongs to, and the details is the
// HistoryService.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment