| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 if (!sent) { | 372 if (!sent) { |
| 373 OnPipeError(); | 373 OnPipeError(); |
| 374 return false; | 374 return false; |
| 375 } | 375 } |
| 376 | 376 |
| 377 return true; | 377 return true; |
| 378 } | 378 } |
| 379 | 379 |
| 380 bool ChannelMojo::IsSendThreadSafe() const { | 380 bool ChannelMojo::IsSendThreadSafe() const { |
| 381 return true; | 381 return false; |
| 382 } | 382 } |
| 383 | 383 |
| 384 base::ProcessId ChannelMojo::GetPeerPID() const { | 384 base::ProcessId ChannelMojo::GetPeerPID() const { |
| 385 base::AutoLock lock(lock_); | 385 base::AutoLock lock(lock_); |
| 386 if (!message_reader_) | 386 if (!message_reader_) |
| 387 return base::kNullProcessId; | 387 return base::kNullProcessId; |
| 388 | 388 |
| 389 return message_reader_->GetPeerPid(); | 389 return message_reader_->GetPeerPid(); |
| 390 } | 390 } |
| 391 | 391 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 DCHECK(ok); | 463 DCHECK(ok); |
| 464 if (!ok) { | 464 if (!ok) { |
| 465 LOG(ERROR) << "Failed to add new Mojo handle."; | 465 LOG(ERROR) << "Failed to add new Mojo handle."; |
| 466 return MOJO_RESULT_UNKNOWN; | 466 return MOJO_RESULT_UNKNOWN; |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 return MOJO_RESULT_OK; | 469 return MOJO_RESULT_OK; |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace IPC | 472 } // namespace IPC |
| OLD | NEW |