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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 7 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/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 6fcdb074b4a0f6badd1ea04256214a7e2223480d..a53483fbaf2521b8f76ae661a43011010e60be81 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -336,8 +336,9 @@ bool NavigatorImpl::NavigateToEntry(
} else {
RenderFrameHostImpl* dest_render_frame_host =
- frame_tree_node->render_manager()->Navigate(dest_url, frame_entry,
- entry);
+ frame_tree_node->render_manager()->Navigate(
+ dest_url, frame_entry, entry,
+ reload_type != NavigationController::NO_RELOAD);
if (!dest_render_frame_host)
return false; // Unable to create the desired RenderFrameHost.
@@ -1005,7 +1006,8 @@ void NavigatorImpl::RequestNavigation(
ShouldMakeNetworkRequestForURL(
navigation_request->common_params().url)) {
navigation_request->SetWaitingForRendererResponse();
- frame_tree_node->current_frame_host()->DispatchBeforeUnload(true);
+ frame_tree_node->current_frame_host()->DispatchBeforeUnload(
+ true, reload_type != NavigationController::NO_RELOAD);
} else {
navigation_request->BeginNavigation();
}

Powered by Google App Engine
This is Rietveld 408576698