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

Unified Diff: chrome/browser/autofill/autofill_cc_infobar_delegate.cc

Issue 2819086: Removal of TabContentsDelegate::GetBrowser() interface method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « chrome/browser/autofill/autofill_cc_infobar_delegate.h ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_cc_infobar_delegate.cc
===================================================================
--- chrome/browser/autofill/autofill_cc_infobar_delegate.cc (revision 55729)
+++ chrome/browser/autofill/autofill_cc_infobar_delegate.cc (working copy)
@@ -9,7 +9,6 @@
#include "base/histogram.h"
#include "chrome/browser/autofill/autofill_cc_infobar.h"
#include "chrome/browser/autofill/autofill_manager.h"
-#include "chrome/browser/browser.h"
#include "chrome/browser/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -23,15 +22,9 @@
AutoFillCCInfoBarDelegate::AutoFillCCInfoBarDelegate(TabContents* tab_contents,
AutoFillManager* host)
: ConfirmInfoBarDelegate(tab_contents),
- browser_(NULL),
host_(host) {
- if (tab_contents) {
- // This is NULL for TestTabContents.
- if (tab_contents->delegate())
- browser_ = tab_contents->delegate()->GetBrowser();
-
+ if (tab_contents)
tab_contents->AddInfoBar(this);
- }
}
AutoFillCCInfoBarDelegate::~AutoFillCCInfoBarDelegate() {
@@ -103,8 +96,8 @@
}
bool AutoFillCCInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- browser_->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(), NEW_FOREGROUND_TAB,
- PageTransition::TYPED);
+ host_->tab_contents()->OpenURL(GURL(kAutoFillLearnMoreUrl), GURL(),
+ NEW_FOREGROUND_TAB, PageTransition::TYPED);
return false;
}
« no previous file with comments | « chrome/browser/autofill/autofill_cc_infobar_delegate.h ('k') | chrome/browser/autofill/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698