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

Side by Side Diff: chrome/test/thread_observer_helper.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
« no previous file with comments | « chrome/test/test_notification_tracker.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_THREAD_OBSERVER_HELPER_H__ 5 #ifndef CHROME_TEST_THREAD_OBSERVER_HELPER_H__
6 #define CHROME_TEST_THREAD_OBSERVER_HELPER_H__ 6 #define CHROME_TEST_THREAD_OBSERVER_HELPER_H__
7 #pragma once 7 #pragma once
8 8
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/waitable_event.h" 10 #include "base/waitable_event.h"
11 #include "chrome/browser/browser_thread.h" 11 #include "chrome/browser/browser_thread.h"
12 #include "chrome/common/notification_observer_mock.h" 12 #include "chrome/common/notification_observer_mock.h"
13 #include "chrome/common/notification_registrar.h" 13 #include "chrome/common/notification_registrar.h"
14 #include "chrome/common/notification_service.h"
15 14
16 // Helper class to add and remove observers on a non-UI thread from 15 // Helper class to add and remove observers on a non-UI thread from
17 // the UI thread. 16 // the UI thread.
18 template <class T, typename Traits> 17 template <class T, typename Traits>
19 class ThreadObserverHelper : public base::RefCountedThreadSafe<T, Traits> { 18 class ThreadObserverHelper : public base::RefCountedThreadSafe<T, Traits> {
20 public: 19 public:
21 explicit ThreadObserverHelper(BrowserThread::ID id) 20 explicit ThreadObserverHelper(BrowserThread::ID id)
22 : id_(id), done_event_(false, false) {} 21 : id_(id), done_event_(false, false) {}
23 22
24 void Init() { 23 void Init() {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 typedef ThreadObserverHelper< 61 typedef ThreadObserverHelper<
63 DBThreadObserverHelper, 62 DBThreadObserverHelper,
64 BrowserThread::DeleteOnDBThread> DBThreadObserverHelperBase; 63 BrowserThread::DeleteOnDBThread> DBThreadObserverHelperBase;
65 64
66 class DBThreadObserverHelper : public DBThreadObserverHelperBase { 65 class DBThreadObserverHelper : public DBThreadObserverHelperBase {
67 public: 66 public:
68 DBThreadObserverHelper() : DBThreadObserverHelperBase(BrowserThread::DB) {} 67 DBThreadObserverHelper() : DBThreadObserverHelperBase(BrowserThread::DB) {}
69 }; 68 };
70 69
71 #endif // CHROME_TEST_THREAD_OBSERVER_HELPER_H__ 70 #endif // CHROME_TEST_THREAD_OBSERVER_HELPER_H__
OLDNEW
« no previous file with comments | « chrome/test/test_notification_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698