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

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

Issue 2954343005: Merge ResourceRequestBodyImpl and ResourceRequestBody. (Closed)
Patch Set: Remove comment 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 (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/blob_storage/chrome_blob_storage_context.h"
18 #include "content/browser/loader/resource_requester_info.h" 18 #include "content/browser/loader/resource_requester_info.h"
19 #include "content/common/resource_request_body_impl.h"
20 #include "content/common/url_loader.mojom.h" 19 #include "content/common/url_loader.mojom.h"
21 #include "content/public/browser/navigation_ui_data.h" 20 #include "content/public/browser/navigation_ui_data.h"
22 #include "content/public/browser/resource_request_info.h" 21 #include "content/public/browser/resource_request_info.h"
23 #include "content/public/common/previews_state.h" 22 #include "content/public/common/previews_state.h"
24 #include "content/public/common/referrer.h" 23 #include "content/public/common/referrer.h"
24 #include "content/public/common/resource_request_body.h"
25 #include "content/public/common/resource_type.h" 25 #include "content/public/common/resource_type.h"
26 #include "net/base/load_states.h" 26 #include "net/base/load_states.h"
27 27
28 namespace content { 28 namespace content {
29 class DetachableResourceHandler; 29 class DetachableResourceHandler;
30 class ResourceContext; 30 class ResourceContext;
31 struct GlobalRequestID; 31 struct GlobalRequestID;
32 struct GlobalRoutingID; 32 struct GlobalRoutingID;
33 33
34 // Holds the data ResourceDispatcherHost associates with each request. 34 // Holds the data ResourceDispatcherHost associates with each request.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool has_user_gesture, 66 bool has_user_gesture,
67 bool enable_load_timing, 67 bool enable_load_timing,
68 bool enable_upload_progress, 68 bool enable_upload_progress,
69 bool do_not_prompt_for_login, 69 bool do_not_prompt_for_login,
70 blink::WebReferrerPolicy referrer_policy, 70 blink::WebReferrerPolicy referrer_policy,
71 blink::WebPageVisibilityState visibility_state, 71 blink::WebPageVisibilityState visibility_state,
72 ResourceContext* context, 72 ResourceContext* context,
73 bool report_raw_headers, 73 bool report_raw_headers,
74 bool is_async, 74 bool is_async,
75 PreviewsState previews_state, 75 PreviewsState previews_state,
76 const scoped_refptr<ResourceRequestBodyImpl> body, 76 const scoped_refptr<ResourceRequestBody> body,
77 bool initiated_in_secure_context); 77 bool initiated_in_secure_context);
78 ~ResourceRequestInfoImpl() override; 78 ~ResourceRequestInfoImpl() override;
79 79
80 // ResourceRequestInfo implementation: 80 // ResourceRequestInfo implementation:
81 WebContentsGetter GetWebContentsGetterForRequest() const override; 81 WebContentsGetter GetWebContentsGetterForRequest() const override;
82 FrameTreeNodeIdGetter GetFrameTreeNodeIdGetterForRequest() const override; 82 FrameTreeNodeIdGetter GetFrameTreeNodeIdGetterForRequest() const override;
83 ResourceContext* GetContext() const override; 83 ResourceContext* GetContext() const override;
84 int GetChildID() const override; 84 int GetChildID() const override;
85 int GetRouteID() const override; 85 int GetRouteID() const override;
86 GlobalRequestID GetGlobalRequestID() const override; 86 GlobalRequestID GetGlobalRequestID() const override;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 bool is_load_timing_enabled() const { return enable_load_timing_; } 176 bool is_load_timing_enabled() const { return enable_load_timing_; }
177 177
178 bool is_upload_progress_enabled() const { return enable_upload_progress_; } 178 bool is_upload_progress_enabled() const { return enable_upload_progress_; }
179 179
180 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } 180 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; }
181 void set_do_not_prompt_for_login(bool do_not_prompt) { 181 void set_do_not_prompt_for_login(bool do_not_prompt) {
182 do_not_prompt_for_login_ = do_not_prompt; 182 do_not_prompt_for_login_ = do_not_prompt;
183 } 183 }
184 184
185 const scoped_refptr<ResourceRequestBodyImpl>& body() const { return body_; } 185 const scoped_refptr<ResourceRequestBody>& body() const { return body_; }
186 void ResetBody(); 186 void ResetBody();
187 187
188 bool initiated_in_secure_context() const { 188 bool initiated_in_secure_context() const {
189 return initiated_in_secure_context_; 189 return initiated_in_secure_context_;
190 } 190 }
191 void set_initiated_in_secure_context_for_testing(bool secure) { 191 void set_initiated_in_secure_context_for_testing(bool secure) {
192 initiated_in_secure_context_ = secure; 192 initiated_in_secure_context_ = secure;
193 } 193 }
194 194
195 void set_navigation_ui_data( 195 void set_navigation_ui_data(
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool counted_as_in_flight_request_; 231 bool counted_as_in_flight_request_;
232 ResourceType resource_type_; 232 ResourceType resource_type_;
233 ui::PageTransition transition_type_; 233 ui::PageTransition transition_type_;
234 int memory_cost_; 234 int memory_cost_;
235 blink::WebReferrerPolicy referrer_policy_; 235 blink::WebReferrerPolicy referrer_policy_;
236 blink::WebPageVisibilityState visibility_state_; 236 blink::WebPageVisibilityState visibility_state_;
237 ResourceContext* context_; 237 ResourceContext* context_;
238 bool report_raw_headers_; 238 bool report_raw_headers_;
239 bool is_async_; 239 bool is_async_;
240 PreviewsState previews_state_; 240 PreviewsState previews_state_;
241 scoped_refptr<ResourceRequestBodyImpl> body_; 241 scoped_refptr<ResourceRequestBody> body_;
242 bool initiated_in_secure_context_; 242 bool initiated_in_secure_context_;
243 std::unique_ptr<NavigationUIData> navigation_ui_data_; 243 std::unique_ptr<NavigationUIData> navigation_ui_data_;
244 244
245 // Keeps upload body blobs alive for the duration of the request. 245 // Keeps upload body blobs alive for the duration of the request.
246 BlobHandles blob_handles_; 246 BlobHandles blob_handles_;
247 247
248 // This callback is set by MojoAsyncResourceHandler to update its mojo binding 248 // This callback is set by MojoAsyncResourceHandler to update its mojo binding
249 // and remote endpoint. This callback will be removed once PlzNavigate is 249 // and remote endpoint. This callback will be removed once PlzNavigate is
250 // shipped. 250 // shipped.
251 TransferCallback on_transfer_; 251 TransferCallback on_transfer_;
252 252
253 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); 253 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
254 }; 254 };
255 255
256 } // namespace content 256 } // namespace content
257 257
258 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 258 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698