| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 #else | 523 #else |
| 524 NOTREACHED(); | 524 NOTREACHED(); |
| 525 #endif // defined(OS_POSIX) && !defined(OS_NACL) | 525 #endif // defined(OS_POSIX) && !defined(OS_NACL) |
| 526 break; | 526 break; |
| 527 case MessageAttachment::TYPE_MOJO_HANDLE: { | 527 case MessageAttachment::TYPE_MOJO_HANDLE: { |
| 528 mojo::ScopedHandle handle = | 528 mojo::ScopedHandle handle = |
| 529 static_cast<IPC::internal::MojoHandleAttachment*>( | 529 static_cast<IPC::internal::MojoHandleAttachment*>( |
| 530 attachment.get())->TakeHandle(); | 530 attachment.get())->TakeHandle(); |
| 531 handles->push_back(handle.release().value()); | 531 handles->push_back(handle.release().value()); |
| 532 } break; | 532 } break; |
| 533 case MessageAttachment::TYPE_WIN_HANDLE: | 533 case MessageAttachment::TYPE_BROKERABLE_ATTACHMENT: |
| 534 // Brokerable attachments are handled by the AttachmentBroker so |
| 535 // there's no need to do anything here. |
| 534 NOTREACHED(); | 536 NOTREACHED(); |
| 535 break; | 537 break; |
| 536 } | 538 } |
| 537 } | 539 } |
| 538 | 540 |
| 539 set->CommitAll(); | 541 set->CommitAll(); |
| 540 } | 542 } |
| 541 | 543 |
| 542 return MOJO_RESULT_OK; | 544 return MOJO_RESULT_OK; |
| 543 } | 545 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 554 if (!ok) { | 556 if (!ok) { |
| 555 LOG(ERROR) << "Failed to add new Mojo handle."; | 557 LOG(ERROR) << "Failed to add new Mojo handle."; |
| 556 return MOJO_RESULT_UNKNOWN; | 558 return MOJO_RESULT_UNKNOWN; |
| 557 } | 559 } |
| 558 } | 560 } |
| 559 | 561 |
| 560 return MOJO_RESULT_OK; | 562 return MOJO_RESULT_OK; |
| 561 } | 563 } |
| 562 | 564 |
| 563 } // namespace IPC | 565 } // namespace IPC |
| OLD | NEW |