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

Side by Side Diff: mojo/public/cpp/bindings/lib/binding_state.cc

Issue 2345013002: Mojo C++ bindings: remove the lock in MultiplexRouter if it only serves a single interface. (Closed)
Patch Set: . Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mojo/public/cpp/bindings/lib/binding_state.h" 5 #include "mojo/public/cpp/bindings/lib/binding_state.h"
6 6
7 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" 7 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace internal { 10 namespace internal {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void MultiplexedBindingState::BindInternal( 139 void MultiplexedBindingState::BindInternal(
140 ScopedMessagePipeHandle handle, 140 ScopedMessagePipeHandle handle,
141 scoped_refptr<base::SingleThreadTaskRunner> runner, 141 scoped_refptr<base::SingleThreadTaskRunner> runner,
142 const char* interface_name, 142 const char* interface_name,
143 std::unique_ptr<MessageReceiver> request_validator, 143 std::unique_ptr<MessageReceiver> request_validator,
144 bool has_sync_methods, 144 bool has_sync_methods,
145 MessageReceiverWithResponderStatus* stub, 145 MessageReceiverWithResponderStatus* stub,
146 uint32_t interface_version) { 146 uint32_t interface_version) {
147 DCHECK(!router_); 147 DCHECK(!router_);
148 148
149 router_ = new internal::MultiplexRouter(false, std::move(handle), runner); 149 router_ = new MultiplexRouter(
150 std::move(handle), MultiplexRouter::MULTI_INTERFACE, false, runner);
150 router_->SetMasterInterfaceName(interface_name); 151 router_->SetMasterInterfaceName(interface_name);
151 152
152 endpoint_client_.reset(new InterfaceEndpointClient( 153 endpoint_client_.reset(new InterfaceEndpointClient(
153 router_->CreateLocalEndpointHandle(kMasterInterfaceId), stub, 154 router_->CreateLocalEndpointHandle(kMasterInterfaceId), stub,
154 std::move(request_validator), has_sync_methods, std::move(runner), 155 std::move(request_validator), has_sync_methods, std::move(runner),
155 interface_version)); 156 interface_version));
156 } 157 }
157 158
158 } // namesapce internal 159 } // namesapce internal
159 } // namespace mojo 160 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/associated_interface_ptr.h ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698