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

Unified Diff: components/search_engines/template_url_service.cc

Issue 2816383002: Remove non-const version of GetDefaultSearchProvider() and make all callers call the const version (Closed)
Patch Set: Fix compiler error for iOS build by calling the const version of TemplateURLService::GetDefaultSear… 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: components/search_engines/template_url_service.cc
diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc
index f4e7a85a2f3b1f32b92bb22dc90b30ec64c47974..51cdb936e6848e9e01f56b1a34a605104f8760b0 100644
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -604,11 +604,6 @@ void TemplateURLService::SetUserSelectedDefaultSearchProvider(
}
}
-TemplateURL* TemplateURLService::GetDefaultSearchProvider() {
- return const_cast<TemplateURL*>(
- static_cast<const TemplateURLService*>(this)->GetDefaultSearchProvider());
-}
-
const TemplateURL* TemplateURLService::GetDefaultSearchProvider() const {
return loaded_ ? default_search_provider_
: initial_default_search_provider_.get();

Powered by Google App Engine
This is Rietveld 408576698