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

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

Issue 228293004: InfoBarService inherits from InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whitespace 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/autofill/autofill_browsertest.cc
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 0eb543ed0f0ba7b2a7edf8ab3c65840d124163ca..53cac379426874375bcc6ec9abef4c3b08808e12 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar.h"
-#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -71,10 +70,8 @@ class WindowedPersonalDataManagerObserver
}
virtual ~WindowedPersonalDataManagerObserver() {
- if (infobar_service_ &&
- (infobar_service_->infobar_manager()->infobar_count() > 0)) {
- InfoBarManager* infobar_manager = infobar_service_->infobar_manager();
- infobar_manager->RemoveInfoBar(infobar_manager->infobar_at(0));
+ if (infobar_service_ && (infobar_service_->infobar_count() > 0)) {
+ infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0));
}
}
@@ -107,9 +104,8 @@ class WindowedPersonalDataManagerObserver
EXPECT_EQ(chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, type);
infobar_service_ = InfoBarService::FromWebContents(
browser_->tab_strip_model()->GetActiveWebContents());
- InfoBarManager* infobar_manager = infobar_service_->infobar_manager();
ConfirmInfoBarDelegate* infobar_delegate =
- infobar_manager->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
+ infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
ASSERT_TRUE(infobar_delegate);
infobar_delegate->Accept();
}
@@ -495,7 +491,7 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, InvalidCreditCardNumberIsNotAggregated) {
SubmitCreditCard("Bob Smith", card.c_str(), "12", "2014");
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents());
- ASSERT_EQ(0u, infobar_service->infobar_manager()->infobar_count());
+ ASSERT_EQ(0u, infobar_service->infobar_count());
}
// Test whitespaces and separator chars are stripped for valid CC numbers.
@@ -681,7 +677,7 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, CCInfoNotStoredWhenAutocompleteOff) {
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents());
- ASSERT_EQ(0u, infobar_service->infobar_manager()->infobar_count());
+ ASSERT_EQ(0u, infobar_service->infobar_count());
}
// Test profile not aggregated if email found in non-email field.

Powered by Google App Engine
This is Rietveld 408576698