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 #ifndef CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ | 5 #ifndef CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ |
6 #define CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ | 6 #define CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/common/url_loader_factory.mojom.h" | 9 #include "content/common/url_loader_factory.mojom.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 class NetworkContext; | 13 class NetworkContext; |
14 | 14 |
15 // This class is an implementation of mojom::URLLoaderFactory that creates | 15 // This class is an implementation of mojom::URLLoaderFactory that creates |
16 // a mojom::URLLoader. | 16 // a mojom::URLLoader. |
17 class NetworkServiceURLLoaderFactoryImpl : public mojom::URLLoaderFactory { | 17 class NetworkServiceURLLoaderFactoryImpl : public mojom::URLLoaderFactory { |
18 public: | 18 public: |
19 // NOTE: |context| must outlive this instance. | 19 // NOTE: |context| must outlive this instance. |
20 explicit NetworkServiceURLLoaderFactoryImpl(NetworkContext* context); | 20 explicit NetworkServiceURLLoaderFactoryImpl(NetworkContext* context); |
21 | 21 |
22 ~NetworkServiceURLLoaderFactoryImpl() override; | 22 ~NetworkServiceURLLoaderFactoryImpl() override; |
23 | 23 |
24 // mojom::URLLoaderFactory implementation. | 24 // mojom::URLLoaderFactory implementation. |
25 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request, | 25 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request, |
26 int32_t routing_id, | 26 int32_t routing_id, |
27 int32_t request_id, | 27 int32_t request_id, |
| 28 uint32_t options, |
28 const ResourceRequest& url_request, | 29 const ResourceRequest& url_request, |
29 mojom::URLLoaderClientPtr client) override; | 30 mojom::URLLoaderClientPtr client) override; |
30 void SyncLoad(int32_t routing_id, | 31 void SyncLoad(int32_t routing_id, |
31 int32_t request_id, | 32 int32_t request_id, |
32 const ResourceRequest& request, | 33 const ResourceRequest& request, |
33 const SyncLoadCallback& callback) override; | 34 const SyncLoadCallback& callback) override; |
34 | 35 |
35 private: | 36 private: |
36 // Not owned. | 37 // Not owned. |
37 NetworkContext* context_; | 38 NetworkContext* context_; |
38 | 39 |
39 DISALLOW_COPY_AND_ASSIGN(NetworkServiceURLLoaderFactoryImpl); | 40 DISALLOW_COPY_AND_ASSIGN(NetworkServiceURLLoaderFactoryImpl); |
40 }; | 41 }; |
41 | 42 |
42 } // namespace content | 43 } // namespace content |
43 | 44 |
44 #endif // CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ | 45 #endif // CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ |
OLD | NEW |