Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: chrome/browser/search/instant_unittest_base.cc

Issue 287103002: Introduce ability to register callback with GoogleURLTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/instant_unittest_base.cc
diff --git a/chrome/browser/search/instant_unittest_base.cc b/chrome/browser/search/instant_unittest_base.cc
index d164e4b82c127946ce30334908786340a046067e..a4821acb4028d1bf851280e7b187e74f4228015a 100644
--- a/chrome/browser/search/instant_unittest_base.cc
+++ b/chrome/browser/search/instant_unittest_base.cc
@@ -21,9 +21,6 @@
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/variations/entropy_provider.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_source.h"
InstantUnitTestBase::InstantUnitTestBase() {
field_trial_list_.reset(new base::FieldTrialList(
@@ -75,12 +72,8 @@ void InstantUnitTestBase::NotifyGoogleBaseURLUpdate(
// UIThreadSearchTermsData::GoogleBaseURLValue()
// For simulating test behavior, this is overridden below.
UIThreadSearchTermsData::SetGoogleBaseURL(new_google_base_url);
- GoogleURLTracker::UpdatedDetails details(GURL("https://www.google.com/"),
- GURL(new_google_base_url));
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- content::Source<Profile>(profile()->GetOriginalProfile()),
- content::Details<GoogleURLTracker::UpdatedDetails>(&details));
+ TemplateURLServiceFactory::GetForProfile(profile())->OnGoogleURLUpdated(
+ GURL("https://www.google.com"), GURL(new_google_base_url));
}
bool InstantUnitTestBase::IsInstantServiceObserver(
« no previous file with comments | « chrome/browser/google/google_url_tracker.cc ('k') | chrome/browser/search_engines/search_provider_install_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698