| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 return nullptr; | 86 return nullptr; |
| 87 } | 87 } |
| 88 return navigation_handle; | 88 return navigation_handle; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void CheckWillStartRequestOnUIThread( | 91 void CheckWillStartRequestOnUIThread( |
| 92 UIChecksPerformedCallback callback, | 92 UIChecksPerformedCallback callback, |
| 93 int render_process_id, | 93 int render_process_id, |
| 94 int render_frame_host_id, | 94 int render_frame_host_id, |
| 95 const std::string& method, | 95 const std::string& method, |
| 96 const scoped_refptr<content::ResourceRequestBodyImpl>& | 96 const scoped_refptr<content::ResourceRequestBody>& resource_request_body, |
| 97 resource_request_body, | |
| 98 const Referrer& sanitized_referrer, | 97 const Referrer& sanitized_referrer, |
| 99 bool has_user_gesture, | 98 bool has_user_gesture, |
| 100 ui::PageTransition transition, | 99 ui::PageTransition transition, |
| 101 bool is_external_protocol, | 100 bool is_external_protocol, |
| 102 RequestContextType request_context_type, | 101 RequestContextType request_context_type, |
| 103 blink::WebMixedContentContextType mixed_content_context_type) { | 102 blink::WebMixedContentContextType mixed_content_context_type) { |
| 104 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 103 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 105 NavigationHandleImpl* navigation_handle = | 104 NavigationHandleImpl* navigation_handle = |
| 106 FindNavigationHandle(render_process_id, render_frame_host_id, callback); | 105 FindNavigationHandle(render_process_id, render_frame_host_id, callback); |
| 107 if (!navigation_handle) | 106 if (!navigation_handle) |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 389 |
| 391 // If the results of the checks on the UI thread are known, unblock the | 390 // If the results of the checks on the UI thread are known, unblock the |
| 392 // navigation. Otherwise, wait until the callback has executed. | 391 // navigation. Otherwise, wait until the callback has executed. |
| 393 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { | 392 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { |
| 394 OnUIChecksPerformed(on_transfer_done_result_); | 393 OnUIChecksPerformed(on_transfer_done_result_); |
| 395 on_transfer_done_result_ = NavigationThrottle::DEFER; | 394 on_transfer_done_result_ = NavigationThrottle::DEFER; |
| 396 } | 395 } |
| 397 } | 396 } |
| 398 | 397 |
| 399 } // namespace content | 398 } // namespace content |
| OLD | NEW |