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

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: address comments / fix tests 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..8e329a31cea2727761fed16fe67e8e9033ae56d4 100644
--- a/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc
@@ -39,11 +39,14 @@ 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),
+ contents_unique_id, display_languages,
+ accept_button_label_),
google_location_settings_helper_(
- GoogleLocationSettingsHelper::Create()) {
+ GoogleLocationSettingsHelper::Create()),
+ accept_button_label_(accept_button_label) {
}
GeolocationInfoBarDelegateAndroid::~GeolocationInfoBarDelegateAndroid() {
@@ -70,7 +73,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