Index: chrome/browser/google/google_url_tracker_infobar_delegate.cc |
diff --git a/chrome/browser/google/google_url_tracker_infobar_delegate.cc b/chrome/browser/google/google_url_tracker_infobar_delegate.cc |
index 488afa6721a39b20091e8c0f2ff1ceed79be5683..8a4cd9a1a9c73a9d6ba584dc52bdf700c6856562 100644 |
--- a/chrome/browser/google/google_url_tracker_infobar_delegate.cc |
+++ b/chrome/browser/google/google_url_tracker_infobar_delegate.cc |
@@ -58,7 +58,8 @@ void GoogleURLTrackerInfoBarDelegate::Close(bool redo_search) { |
new_search_url = search_url_.ReplaceComponents(replacements); |
} |
- content::WebContents* contents = web_contents(); |
+ content::WebContents* contents = |
+ InfoBarService::WebContentsFromInfoBar(infobar()); |
infobar()->RemoveSelf(); |
// WARNING: |this| may be deleted at this point! Do not access any members! |
@@ -106,7 +107,9 @@ base::string16 GoogleURLTrackerInfoBarDelegate::GetLinkText() const { |
bool GoogleURLTrackerInfoBarDelegate::LinkClicked( |
WindowOpenDisposition disposition) { |
- web_contents()->OpenURL(content::OpenURLParams( |
+ content::WebContents* web_contents = |
+ InfoBarService::WebContentsFromInfoBar(infobar()); |
+ web_contents->OpenURL(content::OpenURLParams( |
google_util::AppendGoogleLocaleParam(GURL( |
"https://www.google.com/support/chrome/bin/answer.py?" |
"answer=1618699")), |