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

Side by Side Diff: chrome/browser/sync/profile_sync_test_util.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
15 #include "chrome/browser/sync/profile_sync_service_observer.h" 15 #include "chrome/browser/sync/profile_sync_service_observer.h"
16 #include "content/browser/browser_thread.h" 16 #include "content/browser/browser_thread.h"
17 #include "content/common/content_notification_types.h"
17 #include "content/common/notification_service.h" 18 #include "content/common/notification_service.h"
18 #include "content/common/notification_source.h" 19 #include "content/common/notification_source.h"
19 #include "content/common/notification_type.h"
20 #include "testing/gmock/include/gmock/gmock.h" 20 #include "testing/gmock/include/gmock/gmock.h"
21 21
22 namespace base { 22 namespace base {
23 class Thread; 23 class Thread;
24 } 24 }
25 25
26 ACTION_P(Notify, type) { 26 ACTION_P(Notify, type) {
27 NotificationService::current()->Notify(type, 27 NotificationService::current()->Notify(type,
28 NotificationService::AllSources(), 28 NotificationService::AllSources(),
29 NotificationService::NoDetails()); 29 NotificationService::NoDetails());
(...skipping 30 matching lines...) Expand all
60 base::WaitableEvent done_event_; 60 base::WaitableEvent done_event_;
61 base::Thread* notification_thread_; 61 base::Thread* notification_thread_;
62 scoped_ptr<NotificationService> service_; 62 scoped_ptr<NotificationService> service_;
63 }; 63 };
64 64
65 class ThreadNotifier : // NOLINT 65 class ThreadNotifier : // NOLINT
66 public base::RefCountedThreadSafe<ThreadNotifier> { 66 public base::RefCountedThreadSafe<ThreadNotifier> {
67 public: 67 public:
68 explicit ThreadNotifier(base::Thread* notify_thread); 68 explicit ThreadNotifier(base::Thread* notify_thread);
69 69
70 void Notify(NotificationType type, const NotificationDetails& details); 70 void Notify(int type, const NotificationDetails& details);
71 71
72 void Notify(NotificationType type, 72 void Notify(int type,
73 const NotificationSource& source, 73 const NotificationSource& source,
74 const NotificationDetails& details); 74 const NotificationDetails& details);
75 75
76 private: 76 private:
77 friend class base::RefCountedThreadSafe<ThreadNotifier>; 77 friend class base::RefCountedThreadSafe<ThreadNotifier>;
78 virtual ~ThreadNotifier(); 78 virtual ~ThreadNotifier();
79 79
80 void NotifyTask(NotificationType type, 80 void NotifyTask(int type,
81 const NotificationSource& source, 81 const NotificationSource& source,
82 const NotificationDetails& details); 82 const NotificationDetails& details);
83 83
84 base::WaitableEvent done_event_; 84 base::WaitableEvent done_event_;
85 base::Thread* notify_thread_; 85 base::Thread* notify_thread_;
86 }; 86 };
87 87
88 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ 88 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_typed_url_unittest.cc ('k') | chrome/browser/sync/profile_sync_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698