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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (!render_frame_host) { | 78 if (!render_frame_host) { |
79 SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL); | 79 SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL); |
80 return nullptr; | 80 return nullptr; |
81 } | 81 } |
82 | 82 |
83 NavigationHandleImpl* navigation_handle = | 83 NavigationHandleImpl* navigation_handle = |
84 render_frame_host->frame_tree_node() | 84 render_frame_host->frame_tree_node() |
85 ->navigator() | 85 ->navigator() |
86 ->GetNavigationHandleForFrameHost(render_frame_host); | 86 ->GetNavigationHandleForFrameHost(render_frame_host); |
87 if (!navigation_handle) { | 87 if (!navigation_handle) { |
88 SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL); | 88 SendCheckResultToIOThread(callback, NavigationThrottle::PROCEED); |
89 return nullptr; | 89 return nullptr; |
90 } | 90 } |
91 return navigation_handle; | 91 return navigation_handle; |
92 } | 92 } |
93 | 93 |
94 void CheckWillStartRequestOnUIThread( | 94 void CheckWillStartRequestOnUIThread( |
95 UIChecksPerformedCallback callback, | 95 UIChecksPerformedCallback callback, |
96 int render_process_id, | 96 int render_process_id, |
97 int render_frame_host_id, | 97 int render_frame_host_id, |
98 const std::string& method, | 98 const std::string& method, |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 371 |
372 // If the results of the checks on the UI thread are known, unblock the | 372 // If the results of the checks on the UI thread are known, unblock the |
373 // navigation. Otherwise, wait until the callback has executed. | 373 // navigation. Otherwise, wait until the callback has executed. |
374 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { | 374 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { |
375 OnUIChecksPerformed(on_transfer_done_result_); | 375 OnUIChecksPerformed(on_transfer_done_result_); |
376 on_transfer_done_result_ = NavigationThrottle::DEFER; | 376 on_transfer_done_result_ = NavigationThrottle::DEFER; |
377 } | 377 } |
378 } | 378 } |
379 | 379 |
380 } // namespace content | 380 } // namespace content |
OLD | NEW |