Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: ipc/mojo/ipc_channel_mojo.cc

Issue 1188923003: Stub in more IPC attachment brokering functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase properly. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ipc/ipc_nacl.gyp ('k') | ipc/mojo/ipc_mojo_bootstrap_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ipc/ipc_nacl.gyp ('k') | ipc/mojo/ipc_mojo_bootstrap_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698