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/history/history.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/history/history.cc')
-rw-r--r-- | chrome/browser/history/history.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc index 6e55160..1274d09 100644 --- a/chrome/browser/history/history.cc +++ b/chrome/browser/history/history.cc @@ -100,7 +100,8 @@ HistoryService::HistoryService() backend_loaded_(false) { if (NotificationService::current()) { // Is NULL when running generate_profile. NotificationService::current()->AddObserver( - this, NOTIFY_HISTORY_URLS_DELETED, Source<Profile>(profile_)); + this, NotificationType::HISTORY_URLS_DELETED, + Source<Profile>(profile_)); } } @@ -109,7 +110,7 @@ HistoryService::HistoryService(Profile* profile) profile_(profile), backend_loaded_(false) { NotificationService::current()->AddObserver( - this, NOTIFY_HISTORY_URLS_DELETED, Source<Profile>(profile_)); + this, NotificationType::HISTORY_URLS_DELETED, Source<Profile>(profile_)); } HistoryService::~HistoryService() { @@ -119,7 +120,8 @@ HistoryService::~HistoryService() { // Unregister for notifications. if (NotificationService::current()) { // Is NULL when running generate_profile. NotificationService::current()->RemoveObserver( - this, NOTIFY_HISTORY_URLS_DELETED, Source<Profile>(profile_)); + this, NotificationType::HISTORY_URLS_DELETED, + Source<Profile>(profile_)); } } @@ -527,7 +529,7 @@ HistoryService::Handle HistoryService::GetVisitCountToHost( void HistoryService::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (type != NOTIFY_HISTORY_URLS_DELETED) { + if (type != NotificationType::HISTORY_URLS_DELETED) { NOTREACHED(); return; } @@ -653,7 +655,7 @@ void HistoryService::BroadcastNotifications( void HistoryService::OnDBLoaded() { LOG(INFO) << "History backend finished loading"; backend_loaded_ = true; - NotificationService::current()->Notify(NOTIFY_HISTORY_LOADED, + NotificationService::current()->Notify(NotificationType::HISTORY_LOADED, Source<Profile>(profile_), Details<HistoryService>(this)); } |