OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/supports_user_data.h" | 16 #include "base/supports_user_data.h" |
| 17 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
17 #include "content/browser/loader/resource_requester_info.h" | 18 #include "content/browser/loader/resource_requester_info.h" |
18 #include "content/common/resource_request_body_impl.h" | 19 #include "content/common/resource_request_body_impl.h" |
19 #include "content/common/url_loader.mojom.h" | 20 #include "content/common/url_loader.mojom.h" |
20 #include "content/public/browser/navigation_ui_data.h" | 21 #include "content/public/browser/navigation_ui_data.h" |
21 #include "content/public/browser/resource_request_info.h" | 22 #include "content/public/browser/resource_request_info.h" |
22 #include "content/public/common/previews_state.h" | 23 #include "content/public/common/previews_state.h" |
23 #include "content/public/common/referrer.h" | 24 #include "content/public/common/referrer.h" |
24 #include "content/public/common/resource_type.h" | 25 #include "content/public/common/resource_type.h" |
25 #include "net/base/load_states.h" | 26 #include "net/base/load_states.h" |
26 | 27 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 194 |
194 void set_navigation_ui_data( | 195 void set_navigation_ui_data( |
195 std::unique_ptr<NavigationUIData> navigation_ui_data) { | 196 std::unique_ptr<NavigationUIData> navigation_ui_data) { |
196 navigation_ui_data_ = std::move(navigation_ui_data); | 197 navigation_ui_data_ = std::move(navigation_ui_data); |
197 } | 198 } |
198 | 199 |
199 void set_on_transfer(const TransferCallback& on_transfer) { | 200 void set_on_transfer(const TransferCallback& on_transfer) { |
200 on_transfer_ = on_transfer; | 201 on_transfer_ = on_transfer; |
201 } | 202 } |
202 | 203 |
| 204 void SetBlobHandles(BlobHandles blob_handles); |
| 205 |
203 private: | 206 private: |
204 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 207 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
205 DeletedFilterDetached); | 208 DeletedFilterDetached); |
206 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 209 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
207 DeletedFilterDetachedRedirect); | 210 DeletedFilterDetachedRedirect); |
208 // Non-owning, may be NULL. | 211 // Non-owning, may be NULL. |
209 DetachableResourceHandler* detachable_handler_; | 212 DetachableResourceHandler* detachable_handler_; |
210 | 213 |
211 scoped_refptr<ResourceRequesterInfo> requester_info_; | 214 scoped_refptr<ResourceRequesterInfo> requester_info_; |
212 int route_id_; | 215 int route_id_; |
(...skipping 19 matching lines...) Expand all Loading... |
232 blink::WebReferrerPolicy referrer_policy_; | 235 blink::WebReferrerPolicy referrer_policy_; |
233 blink::WebPageVisibilityState visibility_state_; | 236 blink::WebPageVisibilityState visibility_state_; |
234 ResourceContext* context_; | 237 ResourceContext* context_; |
235 bool report_raw_headers_; | 238 bool report_raw_headers_; |
236 bool is_async_; | 239 bool is_async_; |
237 PreviewsState previews_state_; | 240 PreviewsState previews_state_; |
238 scoped_refptr<ResourceRequestBodyImpl> body_; | 241 scoped_refptr<ResourceRequestBodyImpl> body_; |
239 bool initiated_in_secure_context_; | 242 bool initiated_in_secure_context_; |
240 std::unique_ptr<NavigationUIData> navigation_ui_data_; | 243 std::unique_ptr<NavigationUIData> navigation_ui_data_; |
241 | 244 |
| 245 // Keeps upload body blobs alive for the duration of the request. |
| 246 BlobHandles blob_handles_; |
| 247 |
242 // This callback is set by MojoAsyncResourceHandler to update its mojo binding | 248 // This callback is set by MojoAsyncResourceHandler to update its mojo binding |
243 // and remote endpoint. This callback will be removed once PlzNavigate is | 249 // and remote endpoint. This callback will be removed once PlzNavigate is |
244 // shipped. | 250 // shipped. |
245 TransferCallback on_transfer_; | 251 TransferCallback on_transfer_; |
246 | 252 |
247 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 253 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
248 }; | 254 }; |
249 | 255 |
250 } // namespace content | 256 } // namespace content |
251 | 257 |
252 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 258 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |