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

Unified Diff: chrome/browser/search_engines/template_url_service_test_util.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
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_service_test_util.cc
diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc
index cf6daf87fc0fca94b71da6fda54f918160c76fc6..cd2d8e491b7bc4a13b0b1ccc45167aabd2e69669 100644
--- a/chrome/browser/search_engines/template_url_service_test_util.cc
+++ b/chrome/browser/search_engines/template_url_service_test_util.cc
@@ -18,7 +18,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/browser/notification_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_CHROMEOS)
@@ -127,13 +126,10 @@ void TemplateURLServiceTestUtilBase::SetGoogleBaseURL(
const GURL& base_url) const {
DCHECK(base_url.is_valid());
UIThreadSearchTermsData data(profile());
- GoogleURLTracker::UpdatedDetails urls(GURL(data.GoogleBaseURLValue()),
- base_url);
+ GURL old_url = GURL(data.GoogleBaseURLValue());
UIThreadSearchTermsData::SetGoogleBaseURL(base_url.spec());
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
- content::Source<Profile>(profile()),
- content::Details<GoogleURLTracker::UpdatedDetails>(&urls));
+ TemplateURLServiceFactory::GetForProfile(profile())
+ ->OnGoogleURLUpdated(old_url, base_url);
}
void TemplateURLServiceTestUtilBase::SetManagedDefaultSearchPreferences(
« no previous file with comments | « chrome/browser/search_engines/template_url_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698