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

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

Issue 2173803003: PlzNavigate: Support renderer-side failed navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plznavigate_notification_done
Patch Set: Rebase Created 4 years, 3 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 | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // We used to cancel the pending renderer here for cross-site downloads. 236 // We used to cancel the pending renderer here for cross-site downloads.
237 // However, it's not safe to do that because the download logic repeatedly 237 // However, it's not safe to do that because the download logic repeatedly
238 // looks for this WebContents based on a render ID. Instead, we just 238 // looks for this WebContents based on a render ID. Instead, we just
239 // leave the pending renderer around until the next navigation event 239 // leave the pending renderer around until the next navigation event
240 // (Navigate, DidNavigate, etc), which will clean it up properly. 240 // (Navigate, DidNavigate, etc), which will clean it up properly.
241 // 241 //
242 // TODO(creis): Find a way to cancel any pending RFH here. 242 // TODO(creis): Find a way to cancel any pending RFH here.
243 } 243 }
244 244
245 // Discard the pending navigation entry if needed. 245 // Discard the pending navigation entry if needed.
246 // PlzNavigate: the entry has already been discarded in FailedNavigation. 246 DiscardPendingEntryOnFailureIfNeeded(render_frame_host->navigation_handle());
247 if (!IsBrowserSideNavigationEnabled()) {
248 DiscardPendingEntryOnFailureIfNeeded(
249 render_frame_host->navigation_handle());
250 }
251 247
252 if (delegate_) { 248 if (delegate_) {
253 delegate_->DidFailProvisionalLoadWithError( 249 delegate_->DidFailProvisionalLoadWithError(
254 render_frame_host, validated_url, params.error_code, 250 render_frame_host, validated_url, params.error_code,
255 params.error_description, params.was_ignored_by_handler); 251 params.error_description, params.was_ignored_by_handler);
256 } 252 }
257 } 253 }
258 254
259 void NavigatorImpl::DidFailLoadWithError( 255 void NavigatorImpl::DidFailLoadWithError(
260 RenderFrameHostImpl* render_frame_host, 256 RenderFrameHostImpl* render_frame_host,
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 if (pending_entry != controller_->GetVisibleEntry() || 1208 if (pending_entry != controller_->GetVisibleEntry() ||
1213 !should_preserve_entry) { 1209 !should_preserve_entry) {
1214 controller_->DiscardPendingEntry(true); 1210 controller_->DiscardPendingEntry(true);
1215 1211
1216 // Also force the UI to refresh. 1212 // Also force the UI to refresh.
1217 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 1213 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
1218 } 1214 }
1219 } 1215 }
1220 1216
1221 } // namespace content 1217 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698