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

Unified Diff: chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/ui/omnibox/alternate_nav_infobar_delegate.cc
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
index 12081eb56fe0438b739eb68c99dc528d508d9de8..0adb45fa7f4483516b0074b06c5238f93c358a5d 100644
--- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
+++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
@@ -82,7 +82,9 @@ bool AlternateNavInfoBarDelegate::LinkClicked(
// Pretend the user typed this URL, so that navigating to it will be the
// default action when it's typed again in the future.
- web_contents()->OpenURL(content::OpenURLParams(
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ web_contents->OpenURL(content::OpenURLParams(
match_.destination_url, content::Referrer(), disposition,
content::PAGE_TRANSITION_TYPED, false));

Powered by Google App Engine
This is Rietveld 408576698