diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
commit | ad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch) | |
tree | 3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome/browser/google | |
parent | 75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff) | |
download | chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2 |
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716
Review URL: http://codereview.chromium.org/8342048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google')
-rw-r--r-- | chrome/browser/google/google_url_tracker.cc | 12 | ||||
-rw-r--r-- | chrome/browser/google/google_url_tracker_unittest.cc | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc index 92df0ca..20e18b8 100644 --- a/chrome/browser/google/google_url_tracker.cc +++ b/chrome/browser/google/google_url_tracker.cc @@ -22,7 +22,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "grit/generated_resources.h" #include "net/base/load_flags.h" #include "net/base/net_util.h" @@ -278,10 +278,10 @@ void GoogleURLTracker::AcceptGoogleURL(const GURL& new_google_url) { google_url_.spec()); g_browser_process->local_state()->SetString(prefs::kLastPromptedGoogleURL, google_url_.spec()); - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_GOOGLE_URL_UPDATED, - NotificationService::AllSources(), - NotificationService::NoDetails()); + content::NotificationService::AllSources(), + content::NotificationService::NoDetails()); need_to_prompt_ = false; } @@ -343,7 +343,7 @@ void GoogleURLTracker::SearchCommitted() { // This notification will fire a bit later in the same call chain we're // currently in. registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } } @@ -353,7 +353,7 @@ void GoogleURLTracker::OnNavigationPending( controller_ = content::Source<NavigationController>(source).ptr(); search_url_ = pending_url; registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING, - NotificationService::AllSources()); + content::NotificationService::AllSources()); // Start listening for the commit notification. We also need to listen for the // tab close command since that means the load will never commit. registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc index d83015e..d224c05 100644 --- a/chrome/browser/google/google_url_tracker_unittest.cc +++ b/chrome/browser/google/google_url_tracker_unittest.cc @@ -15,7 +15,7 @@ #include "chrome/test/base/testing_pref_service.h" #include "content/browser/browser_thread.h" #include "content/common/net/url_fetcher.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "content/test/test_url_fetcher_factory.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_context_getter.h" @@ -189,9 +189,9 @@ void GoogleURLTrackerTest::MockSearchDomainCheckResponse( void GoogleURLTrackerTest::RequestServerCheck() { if (!registrar_.IsRegistered(observer_.get(), chrome::NOTIFICATION_GOOGLE_URL_UPDATED, - NotificationService::AllSources())) { + content::NotificationService::AllSources())) { registrar_.Add(observer_.get(), chrome::NOTIFICATION_GOOGLE_URL_UPDATED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } GoogleURLTracker::RequestServerCheck(); MessageLoop::current()->RunAllPending(); @@ -231,7 +231,7 @@ void GoogleURLTrackerTest::SearchCommitted(const GURL& search_url) { google_url_tracker->SearchCommitted(); if (google_url_tracker->registrar_.IsRegistered(google_url_tracker, content::NOTIFICATION_NAV_ENTRY_PENDING, - NotificationService::AllSources())) + content::NotificationService::AllSources())) google_url_tracker->search_url_ = search_url; } |