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

Side by Side Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2769373002: Treat external protocols as ABORTED with PlzNavigate (Closed)
Patch Set: Created 3 years, 9 months 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/frame_host/navigation_handle_impl.h" 5 #include "content/browser/frame_host/navigation_handle_impl.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/appcache/appcache_navigation_handle.h" 10 #include "content/browser/appcache/appcache_navigation_handle.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 NavigationHandleImpl::~NavigationHandleImpl() { 157 NavigationHandleImpl::~NavigationHandleImpl() {
158 // Transfer requests that have not matched up with another navigation request 158 // Transfer requests that have not matched up with another navigation request
159 // from the renderer need to be cleaned up. These are marked as protected in 159 // from the renderer need to be cleaned up. These are marked as protected in
160 // the RDHI, so they do not get cancelled when frames are destroyed. 160 // the RDHI, so they do not get cancelled when frames are destroyed.
161 if (is_transferring()) { 161 if (is_transferring()) {
162 BrowserThread::PostTask( 162 BrowserThread::PostTask(
163 BrowserThread::IO, FROM_HERE, 163 BrowserThread::IO, FROM_HERE,
164 base::Bind(&NotifyAbandonedTransferNavigation, GetGlobalRequestID())); 164 base::Bind(&NotifyAbandonedTransferNavigation, GetGlobalRequestID()));
165 } 165 }
166 166
167 if (!GetContentClient()->browser()->IsHandledURL(url_)) {
jam 2017/03/24 14:49:49 if this was handled by the navigation interceptor
wychen 2017/03/24 15:33:55 This is obviously the wrong place to inject the er
168 net_error_code_ = net::ERR_ABORTED;
169 }
170
167 if (!IsRendererDebugURL(url_)) 171 if (!IsRendererDebugURL(url_))
168 GetDelegate()->DidFinishNavigation(this); 172 GetDelegate()->DidFinishNavigation(this);
169 173
170 // Cancel the navigation on the IO thread if the NavigationHandle is being 174 // Cancel the navigation on the IO thread if the NavigationHandle is being
171 // destroyed in the middle of the NavigationThrottles checks. 175 // destroyed in the middle of the NavigationThrottles checks.
172 if (!IsBrowserSideNavigationEnabled() && !complete_callback_.is_null()) 176 if (!IsBrowserSideNavigationEnabled() && !complete_callback_.is_null())
173 RunCompleteCallback(NavigationThrottle::CANCEL_AND_IGNORE); 177 RunCompleteCallback(NavigationThrottle::CANCEL_AND_IGNORE);
174 178
175 if (IsInMainFrame()) { 179 if (IsInMainFrame()) {
176 TRACE_EVENT_ASYNC_END2("navigation", "Navigation StartToCommit", this, 180 TRACE_EVENT_ASYNC_END2("navigation", "Navigation StartToCommit", this,
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 if (node->current_url().EqualsIgnoringRef(url_)) { 986 if (node->current_url().EqualsIgnoringRef(url_)) {
983 if (found_self_reference) 987 if (found_self_reference)
984 return true; 988 return true;
985 found_self_reference = true; 989 found_self_reference = true;
986 } 990 }
987 } 991 }
988 return false; 992 return false;
989 } 993 }
990 994
991 } // namespace content 995 } // 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