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

Side by Side Diff: content/common/service_manager/service_manager_connection_impl.cc

Issue 2478653003: Clean up dead InterfaceRegistry instances in ServiceContext (Closed)
Patch Set: . Created 4 years, 1 month 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 | « no previous file | services/service_manager/public/cpp/interface_registry.h » ('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 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 "content/common/service_manager/service_manager_connection_impl.h" 5 #include "content/common/service_manager/service_manager_connection_impl.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 for (auto& entry : connection_filters_) { 251 for (auto& entry : connection_filters_) {
252 accept |= entry.second->OnConnect(remote_info.identity, registry, 252 accept |= entry.second->OnConnect(remote_info.identity, registry,
253 service_context_->connector()); 253 service_context_->connector());
254 } 254 }
255 } 255 }
256 256
257 if (remote_service == "service:content_browser" && 257 if (remote_service == "service:content_browser" &&
258 !has_browser_connection_) { 258 !has_browser_connection_) {
259 has_browser_connection_ = true; 259 has_browser_connection_ = true;
260 registry->set_default_binder(default_browser_binder_); 260 registry->set_default_binder(default_browser_binder_);
261 registry->SetConnectionLostClosure( 261 registry->AddConnectionLostClosure(
262 base::Bind(&IOThreadContext::OnBrowserConnectionLost, this)); 262 base::Bind(&IOThreadContext::OnBrowserConnectionLost, this));
263 return true; 263 return true;
264 } 264 }
265 265
266 // If no filters were interested, reject the connection. 266 // If no filters were interested, reject the connection.
267 return accept; 267 return accept;
268 } 268 }
269 269
270 bool OnStop() override { 270 bool OnStop() override {
271 ClearConnectionFiltersOnIOThread(); 271 ClearConnectionFiltersOnIOThread();
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 void ServiceManagerConnectionImpl::GetInterface( 537 void ServiceManagerConnectionImpl::GetInterface(
538 service_manager::mojom::InterfaceProvider* provider, 538 service_manager::mojom::InterfaceProvider* provider,
539 const std::string& interface_name, 539 const std::string& interface_name,
540 mojo::ScopedMessagePipeHandle request_handle) { 540 mojo::ScopedMessagePipeHandle request_handle) {
541 provider->GetInterface(interface_name, std::move(request_handle)); 541 provider->GetInterface(interface_name, std::move(request_handle));
542 } 542 }
543 543
544 } // namespace content 544 } // namespace content
545 545
OLDNEW
« no previous file with comments | « no previous file | services/service_manager/public/cpp/interface_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698