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/google_url_tracker.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/google_url_tracker.cc')
-rw-r--r-- | chrome/browser/google_url_tracker.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/google_url_tracker.cc b/chrome/browser/google_url_tracker.cc index 6dfdbd6..cdc2a4cd 100644 --- a/chrome/browser/google_url_tracker.cc +++ b/chrome/browser/google_url_tracker.cc @@ -8,6 +8,7 @@ #include "base/string_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profile.h" +#include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "net/base/load_flags.h" @@ -24,7 +25,7 @@ GoogleURLTracker::GoogleURLTracker() need_to_fetch_(false), request_context_available_(!!Profile::GetDefaultRequestContext()) { NotificationService::current()->AddObserver(this, - NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE, + NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, NotificationService::AllSources()); // Because this function can be called during startup, when kicking off a URL @@ -41,7 +42,7 @@ GoogleURLTracker::GoogleURLTracker() GoogleURLTracker::~GoogleURLTracker() { NotificationService::current()->RemoveObserver(this, - NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE, + NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, NotificationService::AllSources()); } @@ -155,7 +156,7 @@ void GoogleURLTracker::OnURLFetchComplete(const URLFetcher* source, g_browser_process->local_state()->SetString(prefs::kLastKnownGoogleURL, base_url_str); google_url_ = base_url; - NotificationService::current()->Notify(NOTIFY_GOOGLE_URL_UPDATED, + NotificationService::current()->Notify(NotificationType::GOOGLE_URL_UPDATED, NotificationService::AllSources(), NotificationService::NoDetails()); } @@ -164,7 +165,7 @@ void GoogleURLTracker::OnURLFetchComplete(const URLFetcher* source, void GoogleURLTracker::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - DCHECK_EQ(NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE, type); + DCHECK_EQ(NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, type.value); request_context_available_ = true; StartFetchIfDesirable(); } |