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

Side by Side Diff: mojo/edk/system/message_pipe_test_utils.cc

Issue 1396783004: Convert mojo::system::ChannelEndpointClient to use our new refcounting stuff (instead of base's). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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/system/message_pipe_test_utils.h ('k') | mojo/edk/system/message_pipe_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/message_pipe_test_utils.h" 5 #include "mojo/edk/system/message_pipe_test_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "mojo/edk/system/channel.h" 10 #include "mojo/edk/system/channel.h"
11 #include "mojo/edk/system/channel_endpoint.h" 11 #include "mojo/edk/system/channel_endpoint.h"
12 #include "mojo/edk/system/message_pipe.h" 12 #include "mojo/edk/system/message_pipe.h"
13 #include "mojo/edk/system/test_utils.h" 13 #include "mojo/edk/system/test_utils.h"
14 #include "mojo/edk/system/waiter.h" 14 #include "mojo/edk/system/waiter.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace system { 17 namespace system {
18 namespace test { 18 namespace test {
19 19
20 MojoResult WaitIfNecessary(scoped_refptr<MessagePipe> mp, 20 MojoResult WaitIfNecessary(MessagePipe* mp,
21 MojoHandleSignals signals, 21 MojoHandleSignals signals,
22 HandleSignalsState* signals_state) { 22 HandleSignalsState* signals_state) {
23 Waiter waiter; 23 Waiter waiter;
24 waiter.Init(); 24 waiter.Init();
25 25
26 MojoResult add_result = 26 MojoResult add_result =
27 mp->AddAwakable(0, &waiter, signals, 0, signals_state); 27 mp->AddAwakable(0, &waiter, signals, 0, signals_state);
28 if (add_result != MOJO_RESULT_OK) { 28 if (add_result != MOJO_RESULT_OK) {
29 return (add_result == MOJO_RESULT_ALREADY_EXISTS) ? MOJO_RESULT_OK 29 return (add_result == MOJO_RESULT_ALREADY_EXISTS) ? MOJO_RESULT_OK
30 : add_result; 30 : add_result;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 void MultiprocessMessagePipeTestBase::Init(RefPtr<ChannelEndpoint>&& ep) { 104 void MultiprocessMessagePipeTestBase::Init(RefPtr<ChannelEndpoint>&& ep) {
105 channel_thread_.Start(helper_.server_platform_handle.Pass(), std::move(ep)); 105 channel_thread_.Start(helper_.server_platform_handle.Pass(), std::move(ep));
106 } 106 }
107 #endif 107 #endif
108 108
109 } // namespace test 109 } // namespace test
110 } // namespace system 110 } // namespace system
111 } // namespace mojo 111 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_test_utils.h ('k') | mojo/edk/system/message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698