diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
commit | bfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch) | |
tree | 70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/dom_ui/new_tab_ui.cc | |
parent | a814d863440f0a154a7299f2d8b440f405c7700e (diff) | |
download | chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2 |
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the
notification service to derive from the notification observer. This splits that
out, so much less of the project should end up including notification_types.h
---Paths modified but not in any changelist:
Review URL: http://codereview.chromium.org/19744
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/new_tab_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index b136bc7..fec1e35 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -24,6 +24,7 @@ #include "chrome/browser/views/keyword_editor_view.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/l10n_util.h" +#include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" @@ -88,7 +89,7 @@ class PaintTimer : public RenderWidgetHost::PaintObserver { base::TimeDelta load_time = last_paint_ - start_; int load_time_ms = static_cast<int>(load_time.InMilliseconds()); NotificationService::current()->Notify( - NOTIFY_INITIAL_NEW_TAB_UI_LOAD, + NotificationType::INITIAL_NEW_TAB_UI_LOAD, NotificationService::AllSources(), Details<int>(&load_time_ms)); UMA_HISTOGRAM_TIMES(L"NewTabUI load", load_time); @@ -284,13 +285,13 @@ MostVisitedHandler::MostVisitedHandler(DOMUIHost* dom_ui_host) // Get notifications when history is cleared. NotificationService* service = NotificationService::current(); - service->AddObserver(this, NOTIFY_HISTORY_URLS_DELETED, + service->AddObserver(this, NotificationType::HISTORY_URLS_DELETED, Source<Profile>(dom_ui_host_->profile())); } MostVisitedHandler::~MostVisitedHandler() { NotificationService* service = NotificationService::current(); - service->RemoveObserver(this, NOTIFY_HISTORY_URLS_DELETED, + service->RemoveObserver(this, NotificationType::HISTORY_URLS_DELETED, Source<Profile>(dom_ui_host_->profile())); } @@ -323,7 +324,7 @@ void MostVisitedHandler::OnSegmentUsageAvailable( void MostVisitedHandler::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (type != NOTIFY_HISTORY_URLS_DELETED) { + if (type != NotificationType::HISTORY_URLS_DELETED) { NOTREACHED(); return; } |