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

Unified Diff: content/browser/frame_host/navigation_handle_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: Rebased on top of separate CL that moves POST body to CommonNavigationParams. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.h
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h
index 56a07b13626dc94915f0c8f4e88e7fb743b7dd6e..07dcccb65f34f396f9a11bdcaaaaa999e2040042 100644
--- a/content/browser/frame_host/navigation_handle_impl.h
+++ b/content/browser/frame_host/navigation_handle_impl.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -24,6 +25,7 @@ struct FrameHostMsg_DidCommitProvisionalLoad_Params;
namespace content {
class NavigatorDelegate;
+class ResourceRequestBody;
class ServiceWorkerContextWrapper;
class ServiceWorkerNavigationHandle;
struct NavigationRequestInfo;
@@ -156,6 +158,14 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
render_frame_host_ = render_frame_host;
}
+ // Gets post body associated with this navigation.
+ const scoped_refptr<ResourceRequestBody>& resource_request_body() const {
+ return resource_request_body_;
+ }
+
+ // Gets HTTP method associated with this navigation.
+ const std::string& method() const { return method_; }
clamy 2016/05/23 15:32:28 Suggestion: should we change the public interface
Łukasz Anforowicz 2016/05/23 16:25:10 Yes - this seems like the right thing to do - only
+
// PlzNavigate
void InitServiceWorkerHandle(
ServiceWorkerContextWrapper* service_worker_context);
@@ -169,12 +179,14 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
// Called when the URLRequest will start in the network stack. |callback|
// will be called when all throttle checks have completed. This will allow
// the caller to cancel the navigation or let it proceed.
- void WillStartRequest(const std::string& method,
- const Referrer& sanitized_referrer,
- bool has_user_gesture,
- ui::PageTransition transition,
- bool is_external_protocol,
- const ThrottleChecksFinishedCallback& callback);
+ void WillStartRequest(
+ const std::string& method,
+ const scoped_refptr<content::ResourceRequestBody>& resource_request_body,
+ const Referrer& sanitized_referrer,
+ bool has_user_gesture,
+ ui::PageTransition transition,
+ bool is_external_protocol,
+ const ThrottleChecksFinishedCallback& callback);
// Called when the URLRequest will be redirected in the network stack.
// |callback| will be called when all throttles check have completed. This
@@ -277,6 +289,9 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
// The HTTP method used for the navigation.
std::string method_;
+ // The body of the request (i.e. body of a post request).
+ scoped_refptr<ResourceRequestBody> resource_request_body_;
+
// The state the navigation is in.
State state_;
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.cc » ('j') | content/browser/frame_host/navigator_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698