OLD | NEW |
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_channel_mojo.h" | 5 #include "ipc/mojo/ipc_channel_mojo.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/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 pending_messages_.push_back(message); | 440 pending_messages_.push_back(message); |
441 // Counts as OK before the connection is established, but it's an | 441 // Counts as OK before the connection is established, but it's an |
442 // error otherwise. | 442 // error otherwise. |
443 return waiting_connect_; | 443 return waiting_connect_; |
444 } | 444 } |
445 | 445 |
446 return message_reader_->Send(make_scoped_ptr(message)); | 446 return message_reader_->Send(make_scoped_ptr(message)); |
447 } | 447 } |
448 | 448 |
449 bool ChannelMojo::IsSendThreadSafe() const { | 449 bool ChannelMojo::IsSendThreadSafe() const { |
450 return false; | 450 return true; |
451 } | 451 } |
452 | 452 |
453 base::ProcessId ChannelMojo::GetPeerPID() const { | 453 base::ProcessId ChannelMojo::GetPeerPID() const { |
454 return peer_pid_; | 454 return peer_pid_; |
455 } | 455 } |
456 | 456 |
457 base::ProcessId ChannelMojo::GetSelfPID() const { | 457 base::ProcessId ChannelMojo::GetSelfPID() const { |
458 return bootstrap_->GetSelfPID(); | 458 return bootstrap_->GetSelfPID(); |
459 } | 459 } |
460 | 460 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 if (!ok) { | 551 if (!ok) { |
552 LOG(ERROR) << "Failed to add new Mojo handle."; | 552 LOG(ERROR) << "Failed to add new Mojo handle."; |
553 return MOJO_RESULT_UNKNOWN; | 553 return MOJO_RESULT_UNKNOWN; |
554 } | 554 } |
555 } | 555 } |
556 | 556 |
557 return MOJO_RESULT_OK; | 557 return MOJO_RESULT_OK; |
558 } | 558 } |
559 | 559 |
560 } // namespace IPC | 560 } // namespace IPC |
OLD | NEW |