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

Unified Diff: chrome/browser/content_settings/permission_queue_controller_unittest.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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: chrome/browser/content_settings/permission_queue_controller_unittest.cc
===================================================================
--- chrome/browser/content_settings/permission_queue_controller_unittest.cc (revision 238220)
+++ chrome/browser/content_settings/permission_queue_controller_unittest.cc (working copy)
@@ -7,13 +7,10 @@
#include "base/synchronization/waitable_event.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/permission_request_id.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_thread.h"
@@ -22,14 +19,9 @@
// PermissionQueueControllerTests ---------------------------------------------
-class PermissionQueueControllerTests : public ChromeRenderViewHostTestHarness,
- public content::NotificationObserver {
+class PermissionQueueControllerTests : public ChromeRenderViewHostTestHarness {
protected:
- PermissionQueueControllerTests() {
- registrar_.Add(this,
- chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
- content::NotificationService::AllSources());
- }
+ PermissionQueueControllerTests() {}
virtual ~PermissionQueueControllerTests() {}
PermissionRequestID RequestID(int bridge_id) {
@@ -46,22 +38,6 @@
InfoBarService::CreateForWebContents(web_contents());
}
- // content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE {
- DCHECK_EQ(chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, type);
- // Delete the removed infobar. In normal Chrome code, this would be handled
- // by the InfoBarContainer. It's safe to do this even if the queue
- // controller Observe() function has not yet been called; see comments in
- // PermissionQueueController::Observe().
- // TODO(pkasting): This will no longer be necessary once the InfoBarService
- // truly owns infobars.
- delete content::Details<InfoBar::RemovedDetails>(details)->first;
- }
-
- content::NotificationRegistrar registrar_;
-
DISALLOW_COPY_AND_ASSIGN(PermissionQueueControllerTests);
};

Powered by Google App Engine
This is Rietveld 408576698