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

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

Issue 5977010: Move CancellationFlag and WaitableEvent to the synchronization subdirectory.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « chrome/test/testing_browser_process.h ('k') | chrome/test/thread_test_helper.h » ('j') | 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/synchronization/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 14
15 // 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
16 // the UI thread. 16 // the UI thread.
17 template <class T, typename Traits> 17 template <class T, typename Traits>
18 class ThreadObserverHelper : public base::RefCountedThreadSafe<T, Traits> { 18 class ThreadObserverHelper : public base::RefCountedThreadSafe<T, Traits> {
19 public: 19 public:
20 explicit ThreadObserverHelper(BrowserThread::ID id) 20 explicit ThreadObserverHelper(BrowserThread::ID id)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 typedef ThreadObserverHelper< 61 typedef ThreadObserverHelper<
62 DBThreadObserverHelper, 62 DBThreadObserverHelper,
63 BrowserThread::DeleteOnDBThread> DBThreadObserverHelperBase; 63 BrowserThread::DeleteOnDBThread> DBThreadObserverHelperBase;
64 64
65 class DBThreadObserverHelper : public DBThreadObserverHelperBase { 65 class DBThreadObserverHelper : public DBThreadObserverHelperBase {
66 public: 66 public:
67 DBThreadObserverHelper() : DBThreadObserverHelperBase(BrowserThread::DB) {} 67 DBThreadObserverHelper() : DBThreadObserverHelperBase(BrowserThread::DB) {}
68 }; 68 };
69 69
70 #endif // CHROME_TEST_THREAD_OBSERVER_HELPER_H__ 70 #endif // CHROME_TEST_THREAD_OBSERVER_HELPER_H__
OLDNEW
« no previous file with comments | « chrome/test/testing_browser_process.h ('k') | chrome/test/thread_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698