| 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_COMMON_THROTTLING_URL_LOADER_H_ | 5 #ifndef CONTENT_COMMON_THROTTLING_URL_LOADER_H_ |
| 6 #define CONTENT_COMMON_THROTTLING_URL_LOADER_H_ | 6 #define CONTENT_COMMON_THROTTLING_URL_LOADER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/common/possibly_associated_interface_ptr.h" | |
| 15 #include "content/common/url_loader.mojom.h" | 14 #include "content/common/url_loader.mojom.h" |
| 16 #include "content/common/url_loader_factory.mojom.h" | 15 #include "content/common/url_loader_factory.mojom.h" |
| 17 #include "content/public/common/url_loader_throttle.h" | 16 #include "content/public/common/url_loader_throttle.h" |
| 18 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
| 19 | 18 |
| 20 namespace base { | 19 namespace base { |
| 21 class SingleThreadTaskRunner; | 20 class SingleThreadTaskRunner; |
| 22 } | 21 } |
| 23 | 22 |
| 24 namespace content { | 23 namespace content { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 DEFERRED_RESPONSE | 120 DEFERRED_RESPONSE |
| 122 }; | 121 }; |
| 123 DeferredStage deferred_stage_ = DEFERRED_NONE; | 122 DeferredStage deferred_stage_ = DEFERRED_NONE; |
| 124 bool cancelled_by_throttle_ = false; | 123 bool cancelled_by_throttle_ = false; |
| 125 | 124 |
| 126 std::unique_ptr<URLLoaderThrottle> throttle_; | 125 std::unique_ptr<URLLoaderThrottle> throttle_; |
| 127 | 126 |
| 128 mojom::URLLoaderClient* forwarding_client_; | 127 mojom::URLLoaderClient* forwarding_client_; |
| 129 mojo::Binding<mojom::URLLoaderClient> client_binding_; | 128 mojo::Binding<mojom::URLLoaderClient> client_binding_; |
| 130 | 129 |
| 131 PossiblyAssociatedInterfacePtr<mojom::URLLoader> url_loader_; | 130 mojom::URLLoaderPtr url_loader_; |
| 132 | 131 |
| 133 struct StartInfo { | 132 struct StartInfo { |
| 134 StartInfo(mojom::URLLoaderFactory* in_url_loader_factory, | 133 StartInfo(mojom::URLLoaderFactory* in_url_loader_factory, |
| 135 int32_t in_routing_id, | 134 int32_t in_routing_id, |
| 136 int32_t in_request_id, | 135 int32_t in_request_id, |
| 137 uint32_t in_options, | 136 uint32_t in_options, |
| 138 StartLoaderCallback in_start_loader_callback, | 137 StartLoaderCallback in_start_loader_callback, |
| 139 const ResourceRequest& in_url_request, | 138 const ResourceRequest& in_url_request, |
| 140 scoped_refptr<base::SingleThreadTaskRunner> in_task_runner); | 139 scoped_refptr<base::SingleThreadTaskRunner> in_task_runner); |
| 141 ~StartInfo(); | 140 ~StartInfo(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 std::unique_ptr<PriorityInfo> priority_info_; | 189 std::unique_ptr<PriorityInfo> priority_info_; |
| 191 | 190 |
| 192 const net::MutableNetworkTrafficAnnotationTag traffic_annotation_; | 191 const net::MutableNetworkTrafficAnnotationTag traffic_annotation_; |
| 193 | 192 |
| 194 DISALLOW_COPY_AND_ASSIGN(ThrottlingURLLoader); | 193 DISALLOW_COPY_AND_ASSIGN(ThrottlingURLLoader); |
| 195 }; | 194 }; |
| 196 | 195 |
| 197 } // namespace content | 196 } // namespace content |
| 198 | 197 |
| 199 #endif // CONTENT_COMMON_THROTTLING_URL_LOADER_H_ | 198 #endif // CONTENT_COMMON_THROTTLING_URL_LOADER_H_ |
| OLD | NEW |