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

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

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed DCHECK_IMPLIES(method == "POST", url.SchemeIs(http or https)). Created 4 years, 6 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 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/supports_user_data.h" 15 #include "base/supports_user_data.h"
16 #include "content/common/resource_request_body.h"
16 #include "content/public/browser/resource_request_info.h" 17 #include "content/public/browser/resource_request_info.h"
17 #include "content/public/common/referrer.h" 18 #include "content/public/common/referrer.h"
18 #include "content/public/common/resource_type.h" 19 #include "content/public/common/resource_type.h"
19 #include "net/base/load_states.h" 20 #include "net/base/load_states.h"
20 21
21 namespace content { 22 namespace content {
22 class CrossSiteResourceHandler; 23 class CrossSiteResourceHandler;
23 class DetachableResourceHandler; 24 class DetachableResourceHandler;
24 class ResourceContext; 25 class ResourceContext;
25 class ResourceMessageFilter; 26 class ResourceMessageFilter;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool enable_load_timing, 60 bool enable_load_timing,
60 bool enable_upload_progress, 61 bool enable_upload_progress,
61 bool do_not_prompt_for_login, 62 bool do_not_prompt_for_login,
62 blink::WebReferrerPolicy referrer_policy, 63 blink::WebReferrerPolicy referrer_policy,
63 blink::WebPageVisibilityState visibility_state, 64 blink::WebPageVisibilityState visibility_state,
64 ResourceContext* context, 65 ResourceContext* context,
65 base::WeakPtr<ResourceMessageFilter> filter, 66 base::WeakPtr<ResourceMessageFilter> filter,
66 bool report_raw_headers, 67 bool report_raw_headers,
67 bool is_async, 68 bool is_async,
68 bool is_using_lofi, 69 bool is_using_lofi,
69 const std::string& original_headers); 70 const std::string& original_headers,
71 const scoped_refptr<ResourceRequestBody> body);
70 ~ResourceRequestInfoImpl() override; 72 ~ResourceRequestInfoImpl() override;
71 73
72 // ResourceRequestInfo implementation: 74 // ResourceRequestInfo implementation:
73 WebContentsGetter GetWebContentsGetterForRequest() const override; 75 WebContentsGetter GetWebContentsGetterForRequest() const override;
74 ResourceContext* GetContext() const override; 76 ResourceContext* GetContext() const override;
75 int GetChildID() const override; 77 int GetChildID() const override;
76 int GetRouteID() const override; 78 int GetRouteID() const override;
77 int GetOriginPID() const override; 79 int GetOriginPID() const override;
78 int GetRenderFrameID() const override; 80 int GetRenderFrameID() const override;
79 bool IsMainFrame() const override; 81 bool IsMainFrame() const override;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 bool is_load_timing_enabled() const { return enable_load_timing_; } 179 bool is_load_timing_enabled() const { return enable_load_timing_; }
178 180
179 bool is_upload_progress_enabled() const { return enable_upload_progress_; } 181 bool is_upload_progress_enabled() const { return enable_upload_progress_; }
180 182
181 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } 183 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; }
182 void set_do_not_prompt_for_login(bool do_not_prompt) { 184 void set_do_not_prompt_for_login(bool do_not_prompt) {
183 do_not_prompt_for_login_ = do_not_prompt; 185 do_not_prompt_for_login_ = do_not_prompt;
184 } 186 }
185 const std::string& original_headers() const { return original_headers_; } 187 const std::string& original_headers() const { return original_headers_; }
186 188
189 const scoped_refptr<ResourceRequestBody>& body() const { return body_; }
190 void ResetBody();
191
187 private: 192 private:
188 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 193 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
189 DeletedFilterDetached); 194 DeletedFilterDetached);
190 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 195 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
191 DeletedFilterDetachedRedirect); 196 DeletedFilterDetachedRedirect);
192 // Non-owning, may be NULL. 197 // Non-owning, may be NULL.
193 CrossSiteResourceHandler* cross_site_handler_; 198 CrossSiteResourceHandler* cross_site_handler_;
194 DetachableResourceHandler* detachable_handler_; 199 DetachableResourceHandler* detachable_handler_;
195 200
196 int process_type_; 201 int process_type_;
(...skipping 21 matching lines...) Expand all
218 blink::WebReferrerPolicy referrer_policy_; 223 blink::WebReferrerPolicy referrer_policy_;
219 blink::WebPageVisibilityState visibility_state_; 224 blink::WebPageVisibilityState visibility_state_;
220 ResourceContext* context_; 225 ResourceContext* context_;
221 // The filter might be deleted without deleting this object if the process 226 // The filter might be deleted without deleting this object if the process
222 // exits during a transfer. 227 // exits during a transfer.
223 base::WeakPtr<ResourceMessageFilter> filter_; 228 base::WeakPtr<ResourceMessageFilter> filter_;
224 bool report_raw_headers_; 229 bool report_raw_headers_;
225 bool is_async_; 230 bool is_async_;
226 bool is_using_lofi_; 231 bool is_using_lofi_;
227 const std::string original_headers_; 232 const std::string original_headers_;
233 scoped_refptr<ResourceRequestBody> body_;
228 234
229 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); 235 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
230 }; 236 };
231 237
232 } // namespace content 238 } // namespace content
233 239
234 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 240 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698