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

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: Rebase + fixed issue with layout test 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 961b37d27b9c034e13fa69c3078acc900c62efbf..79dba635f7c61046d127fae80940c3569c9b811b 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -348,8 +348,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.
@@ -1021,7 +1022,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();
}
« no previous file with comments | « components/test_runner/test_runner_for_specific_view.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698