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

Side by Side Diff: mojo/edk/test/scoped_ipc_support.h

Issue 2620633004: Remove mojo::edk::test::ScopedIPCSupport (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « mojo/edk/test/run_all_unittests.cc ('k') | mojo/edk/test/scoped_ipc_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_TEST_SCOPED_IPC_SUPPORT_H_
6 #define MOJO_EDK_TEST_SCOPED_IPC_SUPPORT_H_
7
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/waitable_event.h"
11 #include "base/task_runner.h"
12 #include "mojo/edk/embedder/process_delegate.h"
13
14 namespace mojo {
15 namespace edk {
16 namespace test {
17
18 base::TaskRunner* GetIoTaskRunner();
19
20 // A simple class that calls |InitIPCSupport()| on construction and
21 // |ShutdownIPCSupport()| on destruction.
22 class ScopedIPCSupport : public ProcessDelegate {
23 public:
24 explicit ScopedIPCSupport(
25 scoped_refptr<base::TaskRunner> io_thread_task_runner);
26 ~ScopedIPCSupport() override;
27
28 private:
29 // |ProcessDelegate| implementation:
30 // Note: Executed on the I/O thread.
31 void OnShutdownComplete() override;
32
33 base::Closure shutdown_closure_;
34 base::WaitableEvent shutdown_event_;
35
36 DISALLOW_COPY_AND_ASSIGN(ScopedIPCSupport);
37 };
38
39 } // namespace test
40 } // namespace edk
41 } // namespace mojo
42
43 #endif // MOJO_EDK_TEST_SCOPED_IPC_SUPPORT_H_
OLDNEW
« no previous file with comments | « mojo/edk/test/run_all_unittests.cc ('k') | mojo/edk/test/scoped_ipc_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698