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

Unified Diff: chrome/browser/ui/startup/google_api_keys_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/startup/google_api_keys_infobar_delegate.cc
diff --git a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
index 50142195c9c18d6b4045fb9aa51462e3e6666306..fd0e4356c9d66d9f29bf906a010cf9b7f3ad5af7 100644
--- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
@@ -43,7 +43,9 @@ base::string16 GoogleApiKeysInfoBarDelegate::GetLinkText() const {
bool GoogleApiKeysInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
- web_contents()->OpenURL(content::OpenURLParams(
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ web_contents->OpenURL(content::OpenURLParams(
GURL("http://www.chromium.org/developers/how-tos/api-keys"),
content::Referrer(),
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,

Powered by Google App Engine
This is Rietveld 408576698