Chromium Code Reviews| 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..3d88a34e9a853e3ff0f7e524fb38134c68aeb534 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( |
|
bulach
2014/02/14 11:36:48
nit: is it possible to keep everything inline?
re
acleung1
2014/02/21 21:18:01
My thoughts were that it was a bit too long as one
|
| 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( |