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

Unified Diff: chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc

Issue 2909583002: Use the name of the default search engine in the search geo disclosure. (Closed)
Patch Set: Feedback Created 3 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
« no previous file with comments | « chrome/browser/android/search_geolocation/search_geolocation_disclosure_infobar_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
diff --git a/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc b/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
index 05d09bebd2ee1e5b38d92558da4540c982dd0568..f45ba6379222e1d524bdb1be2bca3057d808da39 100644
--- a/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
+++ b/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
@@ -204,7 +204,13 @@ void SearchGeolocationDisclosureTabHelper::MaybeShowDisclosureForValidUrl(
return;
// All good, let's show the disclosure and increment the shown count.
- SearchGeolocationDisclosureInfoBarDelegate::Create(web_contents(), gurl);
+ TemplateURLService* template_url_service =
+ TemplateURLServiceFactory::GetForProfile(GetProfile());
+ const TemplateURL* template_url =
+ template_url_service->GetDefaultSearchProvider();
+ base::string16 search_engine_name = template_url->short_name();
+ SearchGeolocationDisclosureInfoBarDelegate::Create(web_contents(), gurl,
+ search_engine_name);
shown_count++;
prefs->SetInteger(prefs::kSearchGeolocationDisclosureShownCount, shown_count);
prefs->SetInt64(prefs::kSearchGeolocationDisclosureLastShowDate,
« no previous file with comments | « chrome/browser/android/search_geolocation/search_geolocation_disclosure_infobar_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698