Index: chrome/browser/media/protected_media_identifier_infobar_delegate.cc |
diff --git a/chrome/browser/media/protected_media_identifier_infobar_delegate.cc b/chrome/browser/media/protected_media_identifier_infobar_delegate.cc |
index daccea1a23c283ad5ee64297a22079dc95a2cce8..1b0277dfd4f436a6d4685c449869f850bad41d2b 100644 |
--- a/chrome/browser/media/protected_media_identifier_infobar_delegate.cc |
+++ b/chrome/browser/media/protected_media_identifier_infobar_delegate.cc |
@@ -24,8 +24,10 @@ InfoBar* ProtectedMediaIdentifierInfoBarDelegate::Create( |
const PermissionRequestID& id, |
const GURL& requesting_frame, |
const std::string& display_languages) { |
+ content::WebContents* web_contents = |
+ InfoBarService::WebContentsFromInfoBar(infobar()); |
const content::NavigationEntry* committed_entry = |
- infobar_service->web_contents()->GetController().GetLastCommittedEntry(); |
+ infobar_service->web_contents->GetController().GetLastCommittedEntry(); |
return infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
scoped_ptr<ConfirmInfoBarDelegate>( |
new ProtectedMediaIdentifierInfoBarDelegate( |
@@ -62,8 +64,10 @@ bool ProtectedMediaIdentifierInfoBarDelegate::Accept() { |
void ProtectedMediaIdentifierInfoBarDelegate::SetPermission( |
bool update_content_setting, |
bool allowed) { |
+ content::WebContents* web_contents = |
+ InfoBarService::WebContentsFromInfoBar(infobar()); |
controller_->OnPermissionSet(id_, requesting_frame_, |
- web_contents()->GetLastCommittedURL(), |
+ web_contents->GetLastCommittedURL(), |
update_content_setting, allowed); |
} |