| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/browser/loader/navigation_resource_throttle.h" | 5 #include "content/browser/loader/navigation_resource_throttle.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 NavigationHandleImpl* navigation_handle = | 128 NavigationHandleImpl* navigation_handle = |
| 129 FindNavigationHandle(render_process_id, render_frame_host_id, callback); | 129 FindNavigationHandle(render_process_id, render_frame_host_id, callback); |
| 130 if (!navigation_handle) | 130 if (!navigation_handle) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 GURL new_validated_url(new_url); | 133 GURL new_validated_url(new_url); |
| 134 RenderProcessHost::FromID(render_process_id) | 134 RenderProcessHost::FromID(render_process_id) |
| 135 ->FilterURL(false, &new_validated_url); | 135 ->FilterURL(false, &new_validated_url); |
| 136 navigation_handle->WillRedirectRequest( | 136 navigation_handle->WillRedirectRequest( |
| 137 new_validated_url, new_method, new_referrer_url, new_is_external_protocol, | 137 new_validated_url, new_method, new_referrer_url, new_is_external_protocol, |
| 138 headers, connection_info, | 138 headers, connection_info, nullptr, |
| 139 base::Bind(&SendCheckResultToIOThread, callback)); | 139 base::Bind(&SendCheckResultToIOThread, callback)); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void WillProcessResponseOnUIThread( | 142 void WillProcessResponseOnUIThread( |
| 143 UIChecksPerformedCallback callback, | 143 UIChecksPerformedCallback callback, |
| 144 int render_process_id, | 144 int render_process_id, |
| 145 int render_frame_host_id, | 145 int render_frame_host_id, |
| 146 scoped_refptr<net::HttpResponseHeaders> headers, | 146 scoped_refptr<net::HttpResponseHeaders> headers, |
| 147 net::HttpResponseInfo::ConnectionInfo connection_info, | 147 net::HttpResponseInfo::ConnectionInfo connection_info, |
| 148 const SSLStatus& ssl_status, | 148 const SSLStatus& ssl_status, |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 // If the results of the checks on the UI thread are known, unblock the | 391 // If the results of the checks on the UI thread are known, unblock the |
| 392 // navigation. Otherwise, wait until the callback has executed. | 392 // navigation. Otherwise, wait until the callback has executed. |
| 393 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { | 393 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { |
| 394 OnUIChecksPerformed(on_transfer_done_result_); | 394 OnUIChecksPerformed(on_transfer_done_result_); |
| 395 on_transfer_done_result_ = NavigationThrottle::DEFER; | 395 on_transfer_done_result_ = NavigationThrottle::DEFER; |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 | 398 |
| 399 } // namespace content | 399 } // namespace content |
| OLD | NEW |