Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/browser/loader/navigation_resource_throttle.cc

Issue 2488163004: Ensure that navigation will proceed when no NavigationHandle is found (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698