| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (!render_frame_host) { | 73 if (!render_frame_host) { |
| 74 SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL); | 74 SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL); |
| 75 return nullptr; | 75 return nullptr; |
| 76 } | 76 } |
| 77 | 77 |
| 78 NavigationHandleImpl* navigation_handle = | 78 NavigationHandleImpl* navigation_handle = |
| 79 render_frame_host->frame_tree_node() | 79 render_frame_host->frame_tree_node() |
| 80 ->navigator() | 80 ->navigator() |
| 81 ->GetNavigationHandleForFrameHost(render_frame_host); | 81 ->GetNavigationHandleForFrameHost(render_frame_host); |
| 82 if (!navigation_handle) { | 82 if (!navigation_handle) { |
| 83 SendCheckResultToIOThread(callback, NavigationThrottle::CANCEL); | 83 SendCheckResultToIOThread(callback, NavigationThrottle::PROCEED); |
| 84 return nullptr; | 84 return nullptr; |
| 85 } | 85 } |
| 86 return navigation_handle; | 86 return navigation_handle; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void CheckWillStartRequestOnUIThread( | 89 void CheckWillStartRequestOnUIThread( |
| 90 UIChecksPerformedCallback callback, | 90 UIChecksPerformedCallback callback, |
| 91 int render_process_id, | 91 int render_process_id, |
| 92 int render_frame_host_id, | 92 int render_frame_host_id, |
| 93 const std::string& method, | 93 const std::string& method, |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 } else if (result == NavigationThrottle::CANCEL) { | 306 } else if (result == NavigationThrottle::CANCEL) { |
| 307 controller()->Cancel(); | 307 controller()->Cancel(); |
| 308 } else if (result == NavigationThrottle::BLOCK_REQUEST) { | 308 } else if (result == NavigationThrottle::BLOCK_REQUEST) { |
| 309 controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT); | 309 controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT); |
| 310 } else { | 310 } else { |
| 311 controller()->Resume(); | 311 controller()->Resume(); |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace content | 315 } // namespace content |
| OLD | NEW |