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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reenabled 2 tests Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index a0f8eec5486b8cb554299b7ffe02e474f0ea75a8..fa3ceb50a80aaf91f5796bf03d592915566fcdea 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4621,11 +4621,13 @@ void RenderFrameImpl::OnCommitNavigation(
std::move(stream_override));
}
+// PlzNavigate
void RenderFrameImpl::OnFailedNavigation(
const CommonNavigationParams& common_params,
const RequestNavigationParams& request_params,
bool has_stale_copy_in_cache,
int error_code) {
+ DCHECK(IsBrowserSideNavigationEnabled());
bool is_reload = IsReload(common_params.navigation_type);
bool is_history_navigation = request_params.page_state.IsValid();
WebURLRequest::CachePolicy cache_policy =
@@ -4651,10 +4653,9 @@ void RenderFrameImpl::OnFailedNavigation(
frame_->isViewSourceModeEnabled());
SendFailedProvisionalLoad(failed_request, error, frame_);
+ // This check should have been done on the browser side already.
if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) {
- // TODO(avi): Remove this; we shouldn't ever be dropping navigations.
- // http://crbug.com/501960
- Send(new FrameHostMsg_DidDropNavigation(routing_id_));
+ NOTREACHED();
return;
}
@@ -5198,6 +5199,11 @@ void RenderFrameImpl::NavigateInternal(
item_for_history_navigation,
history_load_type);
}
+ } else {
+ // The browser expects the frame to be loading this navigation. Inform it
+ // that the load stopped if needed.
+ if (!frame_->isLoading())
+ Send(new FrameHostMsg_DidStopLoading(routing_id_));
}
// In case LoadRequest failed before didCreateDataSource was called.

Powered by Google App Engine
This is Rietveld 408576698