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

Side by Side Diff: chrome/test/test_notification_tracker.h

Issue 5783006: Cleanup: Remove unneeded includes of notification_service.h in other headers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_TEST_TEST_NOTIFICATION_TRACKER_H_ 5 #ifndef CHROME_TEST_TEST_NOTIFICATION_TRACKER_H_
6 #define CHROME_TEST_TEST_NOTIFICATION_TRACKER_H_ 6 #define CHROME_TEST_TEST_NOTIFICATION_TRACKER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/common/notification_details.h"
11 #include "chrome/common/notification_observer.h" 12 #include "chrome/common/notification_observer.h"
12 #include "chrome/common/notification_registrar.h" 13 #include "chrome/common/notification_registrar.h"
13 #include "chrome/common/notification_service.h" 14 #include "chrome/common/notification_source.h"
14 15
15 // Provides an easy way for tests to verify that a given set of notifications 16 // Provides an easy way for tests to verify that a given set of notifications
16 // was received during test execution. 17 // was received during test execution.
17 class TestNotificationTracker : public NotificationObserver { 18 class TestNotificationTracker : public NotificationObserver {
18 public: 19 public:
19 // Records one received notification. 20 // Records one received notification.
20 struct Event { 21 struct Event {
21 Event(); 22 Event();
22 Event(NotificationType t, NotificationSource s, NotificationDetails d); 23 Event(NotificationType t, NotificationSource s, NotificationDetails d);
23 24
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 private: 73 private:
73 NotificationRegistrar registrar_; 74 NotificationRegistrar registrar_;
74 75
75 // Lists all received since last cleared, in the order they were received. 76 // Lists all received since last cleared, in the order they were received.
76 std::vector<Event> events_; 77 std::vector<Event> events_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(TestNotificationTracker); 79 DISALLOW_COPY_AND_ASSIGN(TestNotificationTracker);
79 }; 80 };
80 81
81 #endif // CHROME_TEST_TEST_NOTIFICATION_TRACKER_H_ 82 #endif // CHROME_TEST_TEST_NOTIFICATION_TRACKER_H_
OLDNEW
« no previous file with comments | « chrome/test/live_sync/live_sessions_sync_test.h ('k') | chrome/test/test_notification_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698