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

Unified Diff: chrome/browser/ui/startup/session_crashed_infobar_delegate.cc

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile 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/session_crashed_infobar_delegate.cc
diff --git a/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc b/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
index ad724df5c412d12bdc0b4ca0da3218837588b14b..6e0b21285b8d16b387ee9fc713ad5f74a0ae56f6 100644
--- a/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
@@ -73,7 +73,9 @@ base::string16 SessionCrashedInfoBarDelegate::GetButtonLabel(
bool SessionCrashedInfoBarDelegate::Accept() {
uint32 behavior = 0;
- Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
+ content::WebContents* web_contents =
+ InfoBarService::WebContentsFromInfoBar(infobar());
+ Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
if (browser->tab_strip_model()->count() == 1) {
const content::WebContents* active_tab =
browser->tab_strip_model()->GetWebContentsAt(0);

Powered by Google App Engine
This is Rietveld 408576698