Chromium Code Reviews| Index: content/browser/frame_host/navigation_handle_impl.cc |
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc |
| index a6267b6e28471d552d15d095eec511c5f3964c4c..219efd364ca4ca1dcdf1a498378ad03a75a5f487 100644 |
| --- a/content/browser/frame_host/navigation_handle_impl.cc |
| +++ b/content/browser/frame_host/navigation_handle_impl.cc |
| @@ -183,7 +183,7 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { |
| } |
| RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { |
| - CHECK(state_ >= READY_TO_COMMIT) |
| + CHECK(state_ >= READY_TO_COMMIT || state_ == WILL_PROCESS_RESPONSE) |
|
clamy
2016/06/24 12:13:38
This should be state_ >= WILL_PROCESS_RESPONSE.
Mike West
2016/06/24 14:46:32
Note that https://codereview.chromium.org/20256830
melandory
2016/06/25 01:46:10
Done
|
| << "This accessor should only be called " |
| "after the navigation is ready to commit."; |
| return render_frame_host_; |
| @@ -291,6 +291,19 @@ NavigationHandleImpl::CallWillRedirectRequestForTesting( |
| return result; |
| } |
| +NavigationThrottle::ThrottleCheckResult |
| +NavigationHandleImpl::CallWillProcessResponseForTesting( |
| + content::RenderFrameHost* render_frame_host) { |
| + NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER; |
| + WillProcessResponse(static_cast<RenderFrameHostImpl*>(render_frame_host), |
| + scoped_refptr<net::HttpResponseHeaders>(), |
| + base::Bind(&UpdateThrottleCheckResult, &result)); |
| + |
| + // Reset the callback to ensure it will not be called later. |
| + complete_callback_.Reset(); |
| + return result; |
| +} |
| + |
| NavigationData* NavigationHandleImpl::GetNavigationData() { |
| return navigation_data_.get(); |
| } |