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

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

Issue 2549373004: PlzNavigate: Call NavigationHandle::WillProcessResponse for 204/205s (Closed)
Patch Set: Rebase + addressed comments Created 4 years 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 16ae7a2fe3245fb3bc7cebced866bf43d42b180b..eba07da522c327c1ceb5d2da68d6918584214342 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -28,6 +28,7 @@
#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/content_client.h"
#include "content/public/common/url_constants.h"
+#include "net/base/net_errors.h"
#include "net/url_request/redirect_info.h"
#include "url/gurl.h"
#include "url/url_constants.h"
@@ -677,12 +678,18 @@ bool NavigationHandleImpl::MaybeTransferAndProceed() {
// Inform observers that the navigation is now ready to commit, unless a
// transfer of the navigation failed.
- ReadyToCommitNavigation(render_frame_host_);
+ // PlzNavigate: when a navigation is not set to commit (204/205s/downloads) do
+ // not call ReadyToCommitNavigation.
+ DCHECK(!IsBrowserSideNavigationEnabled() || render_frame_host_ ||
+ net_error_code_ == net::ERR_ABORTED);
+ if (!IsBrowserSideNavigationEnabled() || render_frame_host_)
+ ReadyToCommitNavigation(render_frame_host_);
return true;
}
bool NavigationHandleImpl::MaybeTransferAndProceedInternal() {
- DCHECK(render_frame_host_);
+ DCHECK(render_frame_host_ || (IsBrowserSideNavigationEnabled() &&
+ net_error_code_ == net::ERR_ABORTED));
// PlzNavigate: the final RenderFrameHost handling this navigation has been
// decided before calling WillProcessResponse in
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698