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

Unified Diff: trunk/src/chrome/browser/ui/website_settings/website_settings_unittest.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/ui/website_settings/website_settings_unittest.cc
===================================================================
--- trunk/src/chrome/browser/ui/website_settings/website_settings_unittest.cc (revision 238401)
+++ trunk/src/chrome/browser/ui/website_settings/website_settings_unittest.cc (working copy)
@@ -12,7 +12,7 @@
#include "chrome/browser/content_settings/content_settings_utils.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
-#include "chrome/browser/infobars/infobar.h"
+#include "chrome/browser/infobars/infobar_delegate.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/ui/website_settings/website_settings_ui.h"
#include "chrome/common/content_settings.h"
@@ -391,5 +391,9 @@
website_settings()->OnUIClosing();
ASSERT_EQ(1u, infobar_service()->infobar_count());
- infobar_service()->RemoveInfoBar(infobar_service()->infobar_at(0));
+ // Removing an |InfoBarDelegate| from the |InfoBarService| does not delete
+ // it. Hence the |delegate| must be cleaned up after it was removed from the
+ // |infobar_service|.
+ scoped_ptr<InfoBarDelegate> delegate(infobar_service()->infobar_at(0));
+ infobar_service()->RemoveInfoBar(delegate.get());
}

Powered by Google App Engine
This is Rietveld 408576698