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

Side by Side Diff: mojo/edk/system/test/test_io_thread.h

Issue 1427633003: Move scoped_test_dir.* and test_io_thread.* from edk/test to edk/system/test. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « mojo/edk/system/test/scoped_test_dir.cc ('k') | mojo/edk/system/test/test_io_thread.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MOJO_EDK_TEST_TEST_IO_THREAD_H_ 5 #ifndef MOJO_EDK_SYSTEM_TEST_TEST_IO_THREAD_H_
6 #define MOJO_EDK_TEST_TEST_IO_THREAD_H_ 6 #define MOJO_EDK_SYSTEM_TEST_TEST_IO_THREAD_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/task_runner.h" 10 #include "base/task_runner.h"
11 #include "base/threading/thread.h" 11 #include "base/threading/thread.h"
12 #include "mojo/public/cpp/system/macros.h" 12 #include "mojo/public/cpp/system/macros.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace system {
15 namespace test { 16 namespace test {
16 17
17 // Class to help create/run threads with I/O |MessageLoop|s in tests. 18 // Class to help create/run threads with I/O |MessageLoop|s in tests.
18 class TestIOThread { 19 class TestIOThread {
19 public: 20 public:
20 enum class StartMode { AUTO, MANUAL }; 21 enum class StartMode { AUTO, MANUAL };
21 explicit TestIOThread(StartMode start_mode); 22 explicit TestIOThread(StartMode start_mode);
22 // Stops the I/O thread if necessary. 23 // Stops the I/O thread if necessary.
23 ~TestIOThread(); 24 ~TestIOThread();
24 25
(...skipping 18 matching lines...) Expand all
43 } 44 }
44 45
45 private: 46 private:
46 base::Thread io_thread_; 47 base::Thread io_thread_;
47 bool io_thread_started_; 48 bool io_thread_started_;
48 49
49 MOJO_DISALLOW_COPY_AND_ASSIGN(TestIOThread); 50 MOJO_DISALLOW_COPY_AND_ASSIGN(TestIOThread);
50 }; 51 };
51 52
52 } // namespace test 53 } // namespace test
54 } // namespace system
53 } // namespace mojo 55 } // namespace mojo
54 56
55 #endif // MOJO_EDK_TEST_TEST_IO_THREAD_H_ 57 #endif // MOJO_EDK_SYSTEM_TEST_TEST_IO_THREAD_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/test/scoped_test_dir.cc ('k') | mojo/edk/system/test/test_io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698