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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 if (!sent) { | 345 if (!sent) { |
346 OnPipeError(); | 346 OnPipeError(); |
347 return false; | 347 return false; |
348 } | 348 } |
349 | 349 |
350 return true; | 350 return true; |
351 } | 351 } |
352 | 352 |
353 bool ChannelMojo::IsSendThreadSafe() const { | 353 bool ChannelMojo::IsSendThreadSafe() const { |
354 return false; | 354 return true; |
355 } | 355 } |
356 | 356 |
357 base::ProcessId ChannelMojo::GetPeerPID() const { | 357 base::ProcessId ChannelMojo::GetPeerPID() const { |
358 base::AutoLock lock(lock_); | 358 base::AutoLock lock(lock_); |
359 if (!message_reader_) | 359 if (!message_reader_) |
360 return base::kNullProcessId; | 360 return base::kNullProcessId; |
361 | 361 |
362 return message_reader_->GetPeerPid(); | 362 return message_reader_->GetPeerPid(); |
363 } | 363 } |
364 | 364 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 DCHECK(ok); | 436 DCHECK(ok); |
437 if (!ok) { | 437 if (!ok) { |
438 LOG(ERROR) << "Failed to add new Mojo handle."; | 438 LOG(ERROR) << "Failed to add new Mojo handle."; |
439 return MOJO_RESULT_UNKNOWN; | 439 return MOJO_RESULT_UNKNOWN; |
440 } | 440 } |
441 } | 441 } |
442 return MOJO_RESULT_OK; | 442 return MOJO_RESULT_OK; |
443 } | 443 } |
444 | 444 |
445 } // namespace IPC | 445 } // namespace IPC |
OLD | NEW |