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

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

Issue 1492943005: Remove ShutdownIPCSupportAndWaitForNoChannels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « mojo/edk/system/run_all_unittests.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 2015 The Chromium Authors. All rights reserved. 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 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 #include "mojo/edk/test/scoped_ipc_support.h" 5 #include "mojo/edk/test/scoped_ipc_support.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "mojo/edk/embedder/embedder.h" 8 #include "mojo/edk/embedder/embedder.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace edk { 11 namespace edk {
12 namespace test { 12 namespace test {
13 13
14 namespace internal { 14 namespace internal {
15 15
16 ScopedIPCSupportHelper::ScopedIPCSupportHelper() { 16 ScopedIPCSupportHelper::ScopedIPCSupportHelper() {
17 } 17 }
18 18
19 ScopedIPCSupportHelper::~ScopedIPCSupportHelper() { 19 ScopedIPCSupportHelper::~ScopedIPCSupportHelper() {
20 if (base::MessageLoop::current() && 20 if (base::MessageLoop::current() &&
21 base::MessageLoop::current()->task_runner() == io_thread_task_runner_) { 21 base::MessageLoop::current()->task_runner() == io_thread_task_runner_) {
22 ShutdownIPCSupportOnIOThread(); 22 ShutdownIPCSupportOnIOThread();
23 } else { 23 } else {
24 ShutdownIPCSupportAndWaitForNoChannels(); 24 ShutdownIPCSupport();
25 run_loop_.Run(); 25 run_loop_.Run();
26 } 26 }
27 } 27 }
28 28
29 void ScopedIPCSupportHelper::Init( 29 void ScopedIPCSupportHelper::Init(
30 ProcessDelegate* process_delegate, 30 ProcessDelegate* process_delegate,
31 scoped_refptr<base::TaskRunner> io_thread_task_runner) { 31 scoped_refptr<base::TaskRunner> io_thread_task_runner) {
32 io_thread_task_runner_ = io_thread_task_runner; 32 io_thread_task_runner_ = io_thread_task_runner;
33 InitIPCSupport(process_delegate, io_thread_task_runner_); 33 InitIPCSupport(process_delegate, io_thread_task_runner_);
34 } 34 }
(...skipping 12 matching lines...) Expand all
47 ScopedIPCSupport::~ScopedIPCSupport() { 47 ScopedIPCSupport::~ScopedIPCSupport() {
48 } 48 }
49 49
50 void ScopedIPCSupport::OnShutdownComplete() { 50 void ScopedIPCSupport::OnShutdownComplete() {
51 helper_.OnShutdownCompleteImpl(); 51 helper_.OnShutdownCompleteImpl();
52 } 52 }
53 53
54 } // namespace test 54 } // namespace test
55 } // namespace edk 55 } // namespace edk
56 } // namespace mojo 56 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/run_all_unittests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698