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

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: Change the wireformat to use int32_t for HANDLE. Created 5 years, 6 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
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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698