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

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 Created 7 years, 3 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 c14594f1c9ed6b71857e695c872eff113c5e1501..db2a033772183bca2a2f3a6bc792e4583a1d7cd7 100644
--- a/chrome/browser/geolocation/geolocation_infobar_delegate.cc
+++ b/chrome/browser/geolocation/geolocation_infobar_delegate.cc
@@ -33,10 +33,16 @@ InfoBarDelegate* GeolocationInfoBarDelegate::Create(
const std::string& display_languages) {
const content::NavigationEntry* committed_entry =
infobar_service->web_contents()->GetController().GetLastCommittedEntry();
- return infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ GeolocationInfoBarDelegate* const delegate =
new DelegateType(infobar_service, controller, id, requesting_frame,
committed_entry ? committed_entry->GetUniqueID() : 0,
- display_languages)));
+ display_languages);
+ delegate->Show(infobar_service);
+ return delegate;
+}
+
+void GeolocationInfoBarDelegate::Show(InfoBarService* infobar_service) {
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(this));
}
GeolocationInfoBarDelegate::GeolocationInfoBarDelegate(

Powered by Google App Engine
This is Rietveld 408576698