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 7fcc0188910926880b3c31bcef31ae249e2d773a..39f05de5911b5dbc60e0ed9ba763429795cd29e7 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(); |
Mike West
2015/12/17 13:09:15
This moved up to 'NavigationHandle'.
|
- |
void set_net_error_code(net::Error net_error_code) { |
net_error_code_ = net_error_code; |
} |
@@ -158,6 +153,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_; } |
@@ -199,6 +203,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. |