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

Unified Diff: components/omnibox/browser/history_url_provider.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 | « components/omnibox/browser/history_url_provider.h ('k') | components/search_engines/template_url.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/history_url_provider.cc
diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
index b65ee725e3a72ce6b9b2fed8625a470c0a645cd0..ed391c9a21932d0cf29c89abd33773372ac1cdc8 100644
--- a/components/omnibox/browser/history_url_provider.cc
+++ b/components/omnibox/browser/history_url_provider.cc
@@ -419,7 +419,7 @@ HistoryURLProviderParams::HistoryURLProviderParams(
const AutocompleteInput& input,
bool trim_http,
const AutocompleteMatch& what_you_typed_match,
- TemplateURL* default_search_provider,
+ const TemplateURL* default_search_provider,
const SearchTermsData& search_terms_data)
: origin_task_runner(base::SequencedTaskRunnerHandle::Get()),
input(input),
@@ -504,7 +504,7 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
// retrieve these on the UI thread, and the second pass runs on the history
// thread. |template_url_service| can be null when testing.
TemplateURLService* template_url_service = client()->GetTemplateURLService();
- TemplateURL* default_search_provider = template_url_service ?
+ const TemplateURL* default_search_provider = template_url_service ?
template_url_service->GetDefaultSearchProvider() : nullptr;
// Create the data structure for the autocomplete passes. We'll save this off
« no previous file with comments | « components/omnibox/browser/history_url_provider.h ('k') | components/search_engines/template_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698