Chromium Code Reviews| 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/ipc_channel_mojo.h" | 5 #include "ipc/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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 const std::string& name, | 472 const std::string& name, |
| 473 const GenericAssociatedInterfaceFactory& factory) { | 473 const GenericAssociatedInterfaceFactory& factory) { |
| 474 base::AutoLock locker(associated_interface_lock_); | 474 base::AutoLock locker(associated_interface_lock_); |
| 475 auto result = associated_interfaces_.insert({ name, factory }); | 475 auto result = associated_interfaces_.insert({ name, factory }); |
| 476 DCHECK(result.second); | 476 DCHECK(result.second); |
| 477 } | 477 } |
| 478 | 478 |
| 479 void ChannelMojo::GetGenericRemoteAssociatedInterface( | 479 void ChannelMojo::GetGenericRemoteAssociatedInterface( |
| 480 const std::string& name, | 480 const std::string& name, |
| 481 mojo::ScopedInterfaceEndpointHandle handle) { | 481 mojo::ScopedInterfaceEndpointHandle handle) { |
| 482 if (message_reader_) | 482 if (message_reader_) { |
| 483 message_reader_->GetRemoteInterface(name, std::move(handle)); | 483 message_reader_->GetRemoteInterface(name, std::move(handle)); |
| 484 } else { | |
| 485 mojo::GetIsolatedInterface(std::move(handle)); | |
|
Ken Rockot(use gerrit already)
2017/03/24 19:20:03
nit: I might consider documenting here why we do t
yzshen1
2017/03/25 07:18:15
Done.
| |
| 486 } | |
| 484 } | 487 } |
| 485 | 488 |
| 486 } // namespace IPC | 489 } // namespace IPC |
| OLD | NEW |