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

Unified Diff: trunk/src/chrome/browser/translate/translate_manager_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/translate/translate_manager_browsertest.cc
===================================================================
--- trunk/src/chrome/browser/translate/translate_manager_browsertest.cc (revision 238401)
+++ trunk/src/chrome/browser/translate/translate_manager_browsertest.cc (working copy)
@@ -153,8 +153,7 @@
// infobar.
TranslateInfoBarDelegate* GetTranslateInfoBar() {
return (infobar_service()->infobar_count() == 1) ?
- infobar_service()->infobar_at(0)->delegate()->
- AsTranslateInfoBarDelegate() : NULL;
+ infobar_service()->infobar_at(0)->AsTranslateInfoBarDelegate() : NULL;
}
// If there is 1 infobar and it is a translate infobar, closes it and returns
@@ -164,7 +163,7 @@
if (!infobar)
return false;
infobar->InfoBarDismissed(); // Simulates closing the infobar.
- infobar_service()->RemoveInfoBar(infobar_service()->infobar_at(0));
+ infobar_service()->RemoveInfoBar(infobar);
return true;
}
@@ -187,7 +186,7 @@
if (!infobar)
return false;
infobar->TranslationDeclined();
- infobar_service()->RemoveInfoBar(infobar_service()->infobar_at(0));
+ infobar_service()->RemoveInfoBar(infobar);
return true;
}
@@ -214,7 +213,7 @@
const content::NotificationDetails& details) {
DCHECK_EQ(chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, type);
removed_infobars_.insert(
- content::Details<InfoBar::RemovedDetails>(details)->first->delegate());
+ content::Details<InfoBar::RemovedDetails>(details)->first);
}
MOCK_METHOD1(OnPreferenceChanged, void(const std::string&));

Powered by Google App Engine
This is Rietveld 408576698