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

Side by Side Diff: content/network/network_service.cc

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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 | « content/network/network_service.h ('k') | content/public/browser/content_browser_client.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/network/network_service.h" 5 #include "content/network/network_service.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "content/network/network_service_url_loader_factory_impl.h" 9 #include "content/network/network_service_url_loader_factory_impl.h"
10 #include "services/service_manager/public/cpp/service_info.h" 10 #include "services/service_manager/public/cpp/bind_source_info.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 NetworkService::NetworkService( 14 NetworkService::NetworkService(
15 std::unique_ptr<service_manager::BinderRegistry> registry) 15 std::unique_ptr<service_manager::BinderRegistry> registry)
16 : registry_(std::move(registry)) { 16 : registry_(std::move(registry)) {
17 registry_->AddInterface<mojom::URLLoaderFactory>(this); 17 registry_->AddInterface<mojom::URLLoaderFactory>(this);
18 } 18 }
19 19
20 NetworkService::~NetworkService() = default; 20 NetworkService::~NetworkService() = default;
21 21
22 void NetworkService::OnBindInterface( 22 void NetworkService::OnBindInterface(
23 const service_manager::ServiceInfo& source_info, 23 const service_manager::BindSourceInfo& source_info,
24 const std::string& interface_name, 24 const std::string& interface_name,
25 mojo::ScopedMessagePipeHandle interface_pipe) { 25 mojo::ScopedMessagePipeHandle interface_pipe) {
26 registry_->BindInterface(source_info.identity, interface_name, 26 registry_->BindInterface(source_info.identity, interface_name,
27 std::move(interface_pipe)); 27 std::move(interface_pipe));
28 } 28 }
29 29
30 void NetworkService::Create(const service_manager::Identity& remote_identity, 30 void NetworkService::Create(const service_manager::Identity& remote_identity,
31 mojom::URLLoaderFactoryRequest request) { 31 mojom::URLLoaderFactoryRequest request) {
32 loader_factory_bindings_.AddBinding( 32 loader_factory_bindings_.AddBinding(
33 base::MakeUnique<NetworkServiceURLLoaderFactoryImpl>(&context_), 33 base::MakeUnique<NetworkServiceURLLoaderFactoryImpl>(&context_),
34 std::move(request)); 34 std::move(request));
35 } 35 }
36 36
37 } // namespace content 37 } // namespace content
OLDNEW
« no previous file with comments | « content/network/network_service.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698