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

Unified Diff: trunk/src/chrome/browser/notifications/notification_browsertest.cc

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/browser/notifications/notification_browsertest.cc
===================================================================
--- trunk/src/chrome/browser/notifications/notification_browsertest.cc (revision 238401)
+++ trunk/src/chrome/browser/notifications/notification_browsertest.cc (working copy)
@@ -16,7 +16,6 @@
#include "chrome/browser/browser_process.h"
#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_service.h"
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/notifications/balloon_collection.h"
@@ -321,7 +320,7 @@
ASSERT_EQ(1U, infobar_service->infobar_count());
ConfirmInfoBarDelegate* confirm_infobar =
- infobar_service->infobar_at(0)->delegate()->AsConfirmInfoBarDelegate();
+ infobar_service->infobar_at(0)->AsConfirmInfoBarDelegate();
ASSERT_TRUE(confirm_infobar);
int buttons = confirm_infobar->GetButtons();
EXPECT_TRUE(buttons & ConfirmInfoBarDelegate::BUTTON_OK);
@@ -407,12 +406,12 @@
return false;
}
- InfoBar* infobar = infobar_service->infobar_at(infobar_index);
- InfoBarDelegate* infobar_delegate = infobar->delegate();
+ InfoBarDelegate* infobar_delegate =
+ infobar_service->infobar_at(infobar_index);
switch (action) {
case DISMISS:
infobar_delegate->InfoBarDismissed();
- infobar_service->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar_delegate);
return true;
case ALLOW: {
@@ -421,7 +420,7 @@
if (!confirm_infobar_delegate) {
ADD_FAILURE();
} else if (confirm_infobar_delegate->Accept()) {
- infobar_service->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar_delegate);
return true;
}
}
@@ -432,7 +431,7 @@
if (!confirm_infobar_delegate) {
ADD_FAILURE();
} else if (confirm_infobar_delegate->Cancel()) {
- infobar_service->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar_delegate);
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698