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

Unified Diff: chrome/browser/search_engines/template_url_service.cc

Issue 303233006: Abstract GoogleURLTracker & google_util Profile dependencies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix and rebase 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_engines/template_url_service.cc
diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc
index 320db377df1c6727af94376878550b5a56da8ad8..aba90a040f65ea7347153f76f70773f690c77c7d 100644
--- a/chrome/browser/search_engines/template_url_service.cc
+++ b/chrome/browser/search_engines/template_url_service.cc
@@ -1567,8 +1567,12 @@ void TemplateURLService::Init(const Initializer* initializers,
if (profile_ && default_search_provider &&
default_search_provider->HasGoogleBaseURLs()) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- if (!env->HasVar(env_vars::kHeadless))
- GoogleURLTracker::RequestServerCheck(profile_, false);
+ if (!env->HasVar(env_vars::kHeadless)) {
+ GoogleURLTracker* tracker =
+ GoogleURLTrackerFactory::GetForProfile(profile_);
+ if (tracker)
+ tracker->RequestServerCheck(false);
+ }
}
}
@@ -2064,8 +2068,12 @@ bool TemplateURLService::ApplyDefaultSearchChangeNoMetrics(
bool changed = default_search_provider_ != previous_default_search_engine;
if (profile_ && changed && default_search_provider_ &&
- default_search_provider_->HasGoogleBaseURLs())
- GoogleURLTracker::RequestServerCheck(profile_, false);
+ default_search_provider_->HasGoogleBaseURLs()) {
+ GoogleURLTracker* tracker =
+ GoogleURLTrackerFactory::GetForProfile(profile_);
+ if (tracker)
+ tracker->RequestServerCheck(false);
+ }
NotifyObservers();
« no previous file with comments | « chrome/browser/search_engines/search_terms_data.cc ('k') | chrome/browser/ui/navigation_correction_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698