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

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

Issue 211273007: Split InfoBarService core code into InfoBarManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + comments Created 6 years, 9 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_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 65ee8ee97db49a3eea4f7366fed7b621c77123f1..bd7eb65d8d50aa257d3b34eed0d705f9f2c2bccc 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -19,6 +19,7 @@
#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/translate/translate_infobar_delegate.h"
@@ -146,8 +147,9 @@ class WindowedPersonalDataManagerObserver
virtual ~WindowedPersonalDataManagerObserver() {
if (infobar_service_) {
- while (infobar_service_->infobar_count() > 0) {
- infobar_service_->RemoveInfoBar(infobar_service_->infobar_at(0));
+ InfoBarManager* infobar_manager = infobar_service_->infobar_manager();
+ while (infobar_manager->infobar_count() > 0) {
+ infobar_manager->RemoveInfoBar(infobar_manager->infobar_at(0));
}
}
}
@@ -171,8 +173,8 @@ class WindowedPersonalDataManagerObserver
const content::NotificationDetails& details) OVERRIDE {
infobar_service_ = InfoBarService::FromWebContents(
browser_->tab_strip_model()->GetActiveWebContents());
- infobar_service_->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate()->
- Accept();
+ infobar_service_->infobar_manager()->infobar_at(0)->delegate()
+ ->AsConfirmInfoBarDelegate()->Accept();
}
void Wait() {
@@ -978,9 +980,10 @@ IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, AutofillAfterTranslate) {
// Wait for the translation bar to appear and get it.
infobar_observer.Wait();
+ InfoBarManager* infobar_manager =
+ InfoBarService::FromWebContents(GetWebContents())->infobar_manager();
TranslateInfoBarDelegate* delegate =
- InfoBarService::FromWebContents(GetWebContents())->infobar_at(0)->
- delegate()->AsTranslateInfoBarDelegate();
+ infobar_manager->infobar_at(0)->delegate()->AsTranslateInfoBarDelegate();
ASSERT_TRUE(delegate);
EXPECT_EQ(TranslateTabHelper::BEFORE_TRANSLATE, delegate->translate_step());
« no previous file with comments | « chrome/browser/autofill/autofill_browsertest.cc ('k') | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698