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

Unified Diff: chrome/browser/android/contextualsearch/contextual_search_delegate.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
« no previous file with comments | « no previous file | chrome/browser/android/locale/special_locale_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/contextualsearch/contextual_search_delegate.cc
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
index eb1925fdcca0cae21d36da511f0f85c1c114be30..525d8d21d27b77d45096277364cda770c60cf3ad 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
@@ -245,7 +245,8 @@ std::string ContextualSearchDelegate::BuildRequestUrl(
return std::string();
}
- TemplateURL* template_url = template_url_service_->GetDefaultSearchProvider();
+ const TemplateURL* template_url =
+ template_url_service_->GetDefaultSearchProvider();
TemplateURLRef::SearchTermsArgs search_terms_args =
TemplateURLRef::SearchTermsArgs(base::string16());
@@ -373,7 +374,7 @@ bool ContextualSearchDelegate::CanSendPageURL(
return false;
// Ensure that the default search provider is Google.
- TemplateURL* default_search_provider =
+ const TemplateURL* default_search_provider =
template_url_service->GetDefaultSearchProvider();
bool is_default_search_provider_google =
default_search_provider &&
« no previous file with comments | « no previous file | chrome/browser/android/locale/special_locale_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698