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

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

Issue 14241006: Eliminate InfoBarTabHelper. Make InfoBarService a concrete class. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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/autofill/autofill_browsertest.cc
===================================================================
--- chrome/browser/autofill/autofill_browsertest.cc (revision 195254)
+++ chrome/browser/autofill/autofill_browsertest.cc (working copy)
@@ -137,14 +137,8 @@
}
virtual ~WindowedPersonalDataManagerObserver() {
- if (!infobar_service_)
- return;
-
- InfoBarDelegate* infobar = NULL;
- if (infobar_service_->GetInfoBarCount() > 0 &&
- (infobar = infobar_service_->GetInfoBarDelegateAt(0))) {
- infobar_service_->RemoveInfoBar(infobar);
- }
+ if (infobar_service_ && infobar_service_->infobar_count() > 0)
+ infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0));
}
void Wait() {
@@ -176,7 +170,7 @@
// Accept in the infobar.
infobar_service_ = InfoBarService::FromWebContents(
browser_->tab_strip_model()->GetActiveWebContents());
- InfoBarDelegate* infobar = infobar_service_->GetInfoBarDelegateAt(0);
+ InfoBarDelegate* infobar = infobar_service_->infobar_at(0);
ConfirmInfoBarDelegate* confirm_infobar =
infobar->AsConfirmInfoBarDelegate();
@@ -960,8 +954,8 @@
render_view_host(),
ChromeViewHostMsg_TranslateLanguageDetermined(0, "ja", true));
TranslateInfoBarDelegate* infobar = InfoBarService::FromWebContents(
- browser()->tab_strip_model()->GetActiveWebContents())->
- GetInfoBarDelegateAt(0)->AsTranslateInfoBarDelegate();
+ browser()->tab_strip_model()->GetActiveWebContents())->infobar_at(0)->
+ AsTranslateInfoBarDelegate();
ASSERT_TRUE(infobar != NULL);
EXPECT_EQ(TranslateInfoBarDelegate::BEFORE_TRANSLATE,
@@ -1195,7 +1189,7 @@
ASSERT_EQ(0u,
InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents())->
- GetInfoBarCount());
+ infobar_count());
}
// Test whitespaces and separator chars are stripped for valid CC numbers.
@@ -1418,7 +1412,7 @@
ASSERT_EQ(0u,
InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents())->
- GetInfoBarCount());
+ infobar_count());
}
// http://crbug.com/150084
« no previous file with comments | « chrome/browser/accessibility/accessibility_extension_api.cc ('k') | chrome/browser/autofill/autofill_cc_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698