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