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

Unified Diff: chrome/browser/android/locale/special_locale_handler.cc

Issue 2816383002: Remove non-const version of GetDefaultSearchProvider() and make all callers call the const version (Closed)
Patch Set: Fix unit test (the model was already loaded) Created 3 years, 8 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/android/locale/special_locale_handler.cc
diff --git a/chrome/browser/android/locale/special_locale_handler.cc b/chrome/browser/android/locale/special_locale_handler.cc
index e1f55b6440295cb26c724571fc97f20d5068a6e2..8f26c935db83ee9c134a1180d49ddafe79301176 100644
--- a/chrome/browser/android/locale/special_locale_handler.cc
+++ b/chrome/browser/android/locale/special_locale_handler.cc
@@ -100,7 +100,8 @@ void SpecialLocaleHandler::OverrideDefaultSearchProvider(
JNIEnv* env,
const JavaParamRef<jobject>& obj) {
// If the user has changed their default search provider, no-op.
- TemplateURL* current_dsp = template_url_service_->GetDefaultSearchProvider();
+ const TemplateURL* current_dsp =
+ template_url_service_->GetDefaultSearchProvider();
if (!current_dsp ||
current_dsp->prepopulate_id() != TemplateURLPrepopulateData::google.id) {
return;
@@ -117,7 +118,8 @@ void SpecialLocaleHandler::SetGoogleAsDefaultSearch(
JNIEnv* env,
const JavaParamRef<jobject>& obj) {
// If the user has changed their default search provider, no-op.
- TemplateURL* current_dsp = template_url_service_->GetDefaultSearchProvider();
+ const TemplateURL* current_dsp =
+ template_url_service_->GetDefaultSearchProvider();
if (!current_dsp ||
current_dsp->prepopulate_id() != GetDesignatedSearchEngine()) {
return;
« no previous file with comments | « chrome/browser/android/contextualsearch/contextual_search_delegate.cc ('k') | chrome/browser/android/logo_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698