| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 if (!message_reader_->Send(base::WrapUnique(message))) { | 340 if (!message_reader_->Send(base::WrapUnique(message))) { |
| 341 OnPipeError(); | 341 OnPipeError(); |
| 342 return false; | 342 return false; |
| 343 } | 343 } |
| 344 | 344 |
| 345 return true; | 345 return true; |
| 346 } | 346 } |
| 347 | 347 |
| 348 bool ChannelMojo::IsSendThreadSafe() const { | 348 bool ChannelMojo::IsSendThreadSafe() const { |
| 349 return true; | 349 return false; |
| 350 } | 350 } |
| 351 | 351 |
| 352 base::ProcessId ChannelMojo::GetPeerPID() const { | 352 base::ProcessId ChannelMojo::GetPeerPID() const { |
| 353 base::AutoLock lock(lock_); | 353 base::AutoLock lock(lock_); |
| 354 if (!message_reader_) | 354 if (!message_reader_) |
| 355 return base::kNullProcessId; | 355 return base::kNullProcessId; |
| 356 | 356 |
| 357 return message_reader_->GetPeerPid(); | 357 return message_reader_->GetPeerPid(); |
| 358 } | 358 } |
| 359 | 359 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 DCHECK(ok); | 431 DCHECK(ok); |
| 432 if (!ok) { | 432 if (!ok) { |
| 433 LOG(ERROR) << "Failed to add new Mojo handle."; | 433 LOG(ERROR) << "Failed to add new Mojo handle."; |
| 434 return MOJO_RESULT_UNKNOWN; | 434 return MOJO_RESULT_UNKNOWN; |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 return MOJO_RESULT_OK; | 437 return MOJO_RESULT_OK; |
| 438 } | 438 } |
| 439 | 439 |
| 440 } // namespace IPC | 440 } // namespace IPC |
| OLD | NEW |