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

Side by Side Diff: content/browser/loader/url_loader_factory_impl.h

Issue 2954853002: Use Independent URLLoader
Patch Set: . Created 3 years, 5 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 #ifndef CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_ 6 #define CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/url_loader_factory.mojom.h" 12 #include "content/common/url_loader_factory.mojom.h"
13 #include "net/traffic_annotation/network_traffic_annotation.h" 13 #include "net/traffic_annotation/network_traffic_annotation.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class ResourceRequesterInfo; 17 class ResourceRequesterInfo;
18 18
19 // This class is an implementation of mojom::URLLoaderFactory that creates 19 // This class is an implementation of mojom::URLLoaderFactory that creates
20 // a mojom::URLLoader. This class is instantiated only for Service Worker 20 // a mojom::URLLoader. This class is instantiated only for Service Worker
21 // navigation preload or test caseses. 21 // navigation preload or test caseses.
22 class URLLoaderFactoryImpl final : public mojom::URLLoaderFactory { 22 class URLLoaderFactoryImpl final : public mojom::URLLoaderFactory {
23 public: 23 public:
24 ~URLLoaderFactoryImpl() override; 24 ~URLLoaderFactoryImpl() override;
25 25
26 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request, 26 void CreateLoaderAndStart(mojom::URLLoaderRequest request,
27 int32_t routing_id, 27 int32_t routing_id,
28 int32_t request_id, 28 int32_t request_id,
29 uint32_t options, 29 uint32_t options,
30 const ResourceRequest& url_request, 30 const ResourceRequest& url_request,
31 mojom::URLLoaderClientPtr client, 31 mojom::URLLoaderClientPtr client,
32 const net::MutableNetworkTrafficAnnotationTag& 32 const net::MutableNetworkTrafficAnnotationTag&
33 traffic_annotation) override; 33 traffic_annotation) override;
34 void SyncLoad(int32_t routing_id, 34 void SyncLoad(int32_t routing_id,
35 int32_t request_id, 35 int32_t request_id,
36 const ResourceRequest& request, 36 const ResourceRequest& request,
37 SyncLoadCallback callback) override; 37 SyncLoadCallback callback) override;
38 38
39 static void CreateLoaderAndStart( 39 static void CreateLoaderAndStart(
40 ResourceRequesterInfo* requester_info, 40 ResourceRequesterInfo* requester_info,
41 mojom::URLLoaderAssociatedRequest request, 41 mojom::URLLoaderRequest request,
42 int32_t routing_id, 42 int32_t routing_id,
43 int32_t request_id, 43 int32_t request_id,
44 const ResourceRequest& url_request, 44 const ResourceRequest& url_request,
45 mojom::URLLoaderClientPtr client, 45 mojom::URLLoaderClientPtr client,
46 const net::NetworkTrafficAnnotationTag& traffic_annotation); 46 const net::NetworkTrafficAnnotationTag& traffic_annotation);
47 47
48 static void SyncLoad(ResourceRequesterInfo* requester_info, 48 static void SyncLoad(ResourceRequesterInfo* requester_info,
49 int32_t routing_id, 49 int32_t routing_id,
50 int32_t request_id, 50 int32_t request_id,
51 const ResourceRequest& request, 51 const ResourceRequest& request,
(...skipping 15 matching lines...) Expand all
67 67
68 // Task runner for the IO thead. 68 // Task runner for the IO thead.
69 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; 69 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryImpl); 71 DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryImpl);
72 }; 72 };
73 73
74 } // namespace content 74 } // namespace content
75 75
76 #endif // CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_ 76 #endif // CONTENT_BROWSER_LOADER_URL_LOADER_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_request_info_impl.cc ('k') | content/browser/loader/url_loader_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698