| OLD | NEW |
| 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_url_loader_factory_impl.h" | 5 #include "content/network/network_service_url_loader_factory_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/common/resource_request.h" | 8 #include "content/common/resource_request.h" |
| 9 #include "content/network/url_loader_impl.h" | 9 #include "content/network/url_loader_impl.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 NetworkServiceURLLoaderFactoryImpl::NetworkServiceURLLoaderFactoryImpl( | 13 NetworkServiceURLLoaderFactoryImpl::NetworkServiceURLLoaderFactoryImpl( |
| 14 NetworkContext* context, | 14 NetworkContext* context, |
| 15 uint32_t process_id) | 15 uint32_t process_id) |
| 16 : context_(context), process_id_(process_id) { | 16 : context_(context), process_id_(process_id) { |
| 17 ignore_result(process_id_); | 17 ignore_result(process_id_); |
| 18 } | 18 } |
| 19 | 19 |
| 20 NetworkServiceURLLoaderFactoryImpl::~NetworkServiceURLLoaderFactoryImpl() = | 20 NetworkServiceURLLoaderFactoryImpl::~NetworkServiceURLLoaderFactoryImpl() = |
| 21 default; | 21 default; |
| 22 | 22 |
| 23 void NetworkServiceURLLoaderFactoryImpl::CreateLoaderAndStart( | 23 void NetworkServiceURLLoaderFactoryImpl::CreateLoaderAndStart( |
| 24 mojom::URLLoaderRequest request, | 24 mojom::URLLoaderRequest request, |
| 25 int32_t routing_id, | 25 int32_t routing_id, |
| 26 int32_t request_id, | 26 int32_t request_id, |
| 27 uint32_t options, | 27 uint32_t options, |
| 28 const ResourceRequest& url_request, | 28 const ResourceRequest& url_request, |
| 29 mojom::URLLoaderClientPtr client) { | 29 mojom::URLLoaderClientPtr client, |
| 30 new URLLoaderImpl(context_, std::move(request), options, url_request, | 30 const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) { |
| 31 std::move(client)); | 31 new URLLoaderImpl( |
| 32 context_, std::move(request), options, url_request, std::move(client), |
| 33 static_cast<net::NetworkTrafficAnnotationTag>(traffic_annotation)); |
| 32 } | 34 } |
| 33 | 35 |
| 34 void NetworkServiceURLLoaderFactoryImpl::SyncLoad( | 36 void NetworkServiceURLLoaderFactoryImpl::SyncLoad( |
| 35 int32_t routing_id, | 37 int32_t routing_id, |
| 36 int32_t request_id, | 38 int32_t request_id, |
| 37 const ResourceRequest& url_request, | 39 const ResourceRequest& url_request, |
| 38 SyncLoadCallback callback) { | 40 SyncLoadCallback callback) { |
| 39 NOTIMPLEMENTED(); | 41 NOTIMPLEMENTED(); |
| 40 | 42 |
| 41 SyncLoadResult result; | 43 SyncLoadResult result; |
| 42 result.error_code = net::ERR_NOT_IMPLEMENTED; | 44 result.error_code = net::ERR_NOT_IMPLEMENTED; |
| 43 std::move(callback).Run(result); | 45 std::move(callback).Run(result); |
| 44 } | 46 } |
| 45 | 47 |
| 46 } // namespace content | 48 } // namespace content |
| OLD | NEW |