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

Unified Diff: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 years, 8 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/custom_handlers/register_protocol_handler_infobar_delegate.cc
diff --git a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
index 6160b6ef887115364a0b1f315a888ae8c43d206c..dbf37477839635c52558437f52d007957668ac2c 100644
--- a/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
+++ b/chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.cc
@@ -115,7 +115,9 @@ bool RegisterProtocolHandlerInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
content::RecordAction(
base::UserMetricsAction("RegisterProtocolHandler.InfoBar_LearnMore"));
- web_contents()->OpenURL(content::OpenURLParams(
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ web_contents->OpenURL(content::OpenURLParams(
GURL(chrome::kLearnMoreRegisterProtocolHandlerURL), content::Referrer(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
content::PAGE_TRANSITION_LINK, false));

Powered by Google App Engine
This is Rietveld 408576698