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

Side by Side Diff: ipc/mojo/ipc_message_pipe_reader.cc

Issue 1127153003: ipc: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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 | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | ipc/sync_socket_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 "ipc/mojo/ipc_message_pipe_reader.h" 5 #include "ipc/mojo/ipc_message_pipe_reader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/thread_task_runner_handle.h"
12 #include "ipc/mojo/async_handle_waiter.h" 13 #include "ipc/mojo/async_handle_waiter.h"
13 #include "ipc/mojo/ipc_channel_mojo.h" 14 #include "ipc/mojo/ipc_channel_mojo.h"
14 15
15 namespace IPC { 16 namespace IPC {
16 namespace internal { 17 namespace internal {
17 18
18 MessagePipeReader::MessagePipeReader(mojo::ScopedMessagePipeHandle handle, 19 MessagePipeReader::MessagePipeReader(mojo::ScopedMessagePipeHandle handle,
19 MessagePipeReader::Delegate* delegate) 20 MessagePipeReader::Delegate* delegate)
20 : pipe_(handle.Pass()), 21 : pipe_(handle.Pass()),
21 delegate_(delegate), 22 delegate_(delegate),
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Close(); 215 Close();
215 return; 216 return;
216 } 217 }
217 218
218 ReadMessagesThenWait(); 219 ReadMessagesThenWait();
219 } 220 }
220 221
221 void MessagePipeReader::DelayedDeleter::operator()( 222 void MessagePipeReader::DelayedDeleter::operator()(
222 MessagePipeReader* ptr) const { 223 MessagePipeReader* ptr) const {
223 ptr->Close(); 224 ptr->Close();
224 base::MessageLoopProxy::current()->PostTask( 225 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
225 FROM_HERE, base::Bind(&DeleteNow, ptr)); 226 base::Bind(&DeleteNow, ptr));
226 } 227 }
227 228
228 } // namespace internal 229 } // namespace internal
229 } // namespace IPC 230 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698