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 6026c4c099dc46117087c59808460fcf87a32941..04a9aa85fbf5fed45f06a35db6ca6e60c46d558a 100644 |
--- a/content/browser/frame_host/navigation_handle_impl.h |
+++ b/content/browser/frame_host/navigation_handle_impl.h |
@@ -78,6 +78,7 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
bool HasUserGesture() override; |
ui::PageTransition GetPageTransition() override; |
bool IsExternalProtocol() override; |
+ const net::HttpResponseHeaders* GetResponseHeaders() override; |
net::Error GetNetErrorCode() override; |
RenderFrameHostImpl* GetRenderFrameHost() override; |
bool IsSamePage() override; |
@@ -102,12 +103,6 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
NavigatorDelegate* GetDelegate() const; |
- // Returns the response headers for the request. This can only be accessed |
- // after a redirect was encountered or after the the navigation is ready to |
- // commit. It should not be modified, as modifications will not be reflected |
- // in the network stack. |
- const net::HttpResponseHeaders* GetResponseHeaders(); |
- |
void set_net_error_code(net::Error net_error_code) { |
net_error_code_ = net_error_code; |
} |
@@ -159,6 +154,15 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
scoped_refptr<net::HttpResponseHeaders> response_headers, |
const ThrottleChecksFinishedCallback& callback); |
+ // Called when the URLRequest has response data, and is ready to be |
+ // committed. |callback| will be called if the throttle checks indicate |
+ // that the request should be cancelled. Otherwise, 'ReadyToCommitNavigation' |
+ // will be called. |
+ void WillProcessResponse( |
+ RenderFrameHostImpl* render_frame_host, |
+ scoped_refptr<net::HttpResponseHeaders> response_headers, |
+ const ThrottleChecksFinishedCallback& callback); |
+ |
// Returns the FrameTreeNode this navigation is happening in. |
FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
@@ -196,6 +200,7 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); |
NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); |
+ NavigationThrottle::ThrottleCheckResult CheckWillProcessResponse(); |
// Helper function to run and reset the |complete_callback_|. This marks the |
// end of a round of NavigationThrottleChecks. |