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

Unified Diff: chrome/browser/geolocation/geolocation_infobar_delegate_android.cc

Issue 23345004: Fix Android strict-mode violation in GeoLocation info bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rewrite Created 6 years, 10 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/geolocation/geolocation_infobar_delegate_android.cc
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc b/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc
index 9dae643c2c06a786085b478ac4dfbe5d718428ed..5415c14ec9ba13b58d0a43e2e4e480b463a0f28f 100644
--- a/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc
@@ -39,11 +39,13 @@ GeolocationInfoBarDelegateAndroid::GeolocationInfoBarDelegateAndroid(
const PermissionRequestID& id,
const GURL& requesting_frame_url,
int contents_unique_id,
- const std::string& display_languages)
+ const std::string& display_languages,
+ const std::string accept_button_label)
: GeolocationInfoBarDelegate(controller, id, requesting_frame_url,
contents_unique_id, display_languages),
google_location_settings_helper_(
- GoogleLocationSettingsHelper::Create()) {
+ GoogleLocationSettingsHelper::Create()),
+ accept_button_label_(accept_button_label) {
}
GeolocationInfoBarDelegateAndroid::~GeolocationInfoBarDelegateAndroid() {
@@ -70,7 +72,6 @@ bool GeolocationInfoBarDelegateAndroid::Accept() {
base::string16 GeolocationInfoBarDelegateAndroid::GetButtonLabel(
InfoBarButton button) const {
return (button == BUTTON_OK) ?
- base::UTF8ToUTF16(
- google_location_settings_helper_->GetAcceptButtonLabel()) :
+ base::UTF8ToUTF16(accept_button_label_ ) :
l10n_util::GetStringUTF16(IDS_GEOLOCATION_DENY_BUTTON);
}

Powered by Google App Engine
This is Rietveld 408576698