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

Unified Diff: chrome/browser/geolocation/geolocation_infobar_delegate.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.cc
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate.cc b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
index bf67750cc61f092cb9129494491f3d10d732fe8e..da028eceb39ab48619976c4f7acf7aadc4ba02e9 100644
--- a/chrome/browser/geolocation/geolocation_infobar_delegate.cc
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
@@ -67,15 +67,19 @@ InfoBar* GeolocationInfoBarDelegate::Create(
PermissionQueueController* controller,
const PermissionRequestID& id,
const GURL& requesting_frame,
- const std::string& display_languages) {
+ const std::string& display_languages,
+ const std::string& accept_button_label) {
RecordUmaEvent(GEOLOCATION_INFO_BAR_DELEGATE_EVENT_CREATE);
const content::NavigationEntry* committed_entry =
infobar_service->web_contents()->GetController().GetLastCommittedEntry();
- return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new DelegateType(
+ GeolocationInfoBarDelegate* const delegate = new DelegateType(
controller, id, requesting_frame,
committed_entry ? committed_entry->GetUniqueID() : 0,
- display_languages))));
+ display_languages, accept_button_label);
+
+ InfoBar* infobar = ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(delegate)).release();
+ return infobar_service->AddInfoBar(scoped_ptr<InfoBar>(infobar));
}
GeolocationInfoBarDelegate::GeolocationInfoBarDelegate(
@@ -83,7 +87,8 @@ GeolocationInfoBarDelegate::GeolocationInfoBarDelegate(
const PermissionRequestID& id,
const GURL& requesting_frame,
int contents_unique_id,
- const std::string& display_languages)
+ const std::string& display_languages,
+ const std::string& accept_button_label)
: ConfirmInfoBarDelegate(),
controller_(controller),
id_(id),

Powered by Google App Engine
This is Rietveld 408576698