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

Side by Side Diff: ipc/ipc_channel_mojo.cc

Issue 2343033002: IPC: Delete thread-safe send support (Closed)
Patch Set: Created 4 years, 3 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/ipc_channel_mojo.h ('k') | ipc/ipc_channel_proxy.h » ('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/ipc_channel_mojo.h" 5 #include "ipc/ipc_channel_mojo.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // this object, and that would be bad if we are called from Send(). Instead, 363 // this object, and that would be bad if we are called from Send(). Instead,
364 // we return false and hope the caller will close the pipe. If they do not, 364 // we return false and hope the caller will close the pipe. If they do not,
365 // the pipe will still be closed next time OnFileCanReadWithoutBlocking is 365 // the pipe will still be closed next time OnFileCanReadWithoutBlocking is
366 // called. 366 // called.
367 // 367 //
368 // With Mojo, there's no OnFileCanReadWithoutBlocking, but we expect the 368 // With Mojo, there's no OnFileCanReadWithoutBlocking, but we expect the
369 // pipe's connection error handler will be invoked in its place. 369 // pipe's connection error handler will be invoked in its place.
370 return message_reader_->Send(std::move(scoped_message)); 370 return message_reader_->Send(std::move(scoped_message));
371 } 371 }
372 372
373 bool ChannelMojo::IsSendThreadSafe() const {
374 return false;
375 }
376
377 base::ProcessId ChannelMojo::GetPeerPID() const { 373 base::ProcessId ChannelMojo::GetPeerPID() const {
378 if (!message_reader_) 374 if (!message_reader_)
379 return base::kNullProcessId; 375 return base::kNullProcessId;
380 return message_reader_->GetPeerPid(); 376 return message_reader_->GetPeerPid();
381 } 377 }
382 378
383 base::ProcessId ChannelMojo::GetSelfPID() const { 379 base::ProcessId ChannelMojo::GetSelfPID() const {
384 #if defined(OS_LINUX) 380 #if defined(OS_LINUX)
385 if (int global_pid = GetGlobalPid()) 381 if (int global_pid = GetGlobalPid())
386 return global_pid; 382 return global_pid;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 493 }
498 494
499 void ChannelMojo::GetGenericRemoteAssociatedInterface( 495 void ChannelMojo::GetGenericRemoteAssociatedInterface(
500 const std::string& name, 496 const std::string& name,
501 mojo::ScopedInterfaceEndpointHandle handle) { 497 mojo::ScopedInterfaceEndpointHandle handle) {
502 if (message_reader_) 498 if (message_reader_)
503 message_reader_->GetRemoteInterface(name, std::move(handle)); 499 message_reader_->GetRemoteInterface(name, std::move(handle));
504 } 500 }
505 501
506 } // namespace IPC 502 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_mojo.h ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698