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

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

Issue 1002803002: Classify navigations without page id in parallel to the existing classifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: greeeeeeen Created 5 years, 8 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 527eda7d6c833688a45331a6b1d1c5ee40d9771b..59a0754e5806840c8c29dfbc262e762b1e87d1b9 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -173,6 +173,16 @@ void NavigatorImpl::DidFailProvisionalLoadWithError(
<< ", showing_repost_interstitial: " <<
params.showing_repost_interstitial
<< ", frame_id: " << render_frame_host->GetRoutingID();
+ if (controller_->GetPendingEntry() && params.nav_entry_id != 0 &&
+ controller_->GetPendingEntry()->GetUniqueID() != params.nav_entry_id) {
+ // If this failure is browser-initiated but isn't that of the pending entry,
+ // ignore it. This can happen if there is an outstanding request that never
+ // committed, and then a user makes a new request. In that case the new
+ // request will be the pending entry, and the attempt to load the new
+ // request will cause a failure message from the old request.
+ return;
Charlie Reis 2015/04/10 23:54:21 I'm a little surprised this didn't cause issues wi
Avi (use Gerrit) 2015/04/13 22:42:48 This was full of surprise to me, and I was kinda s
+ }
+
GURL validated_url(params.url);
RenderProcessHost* render_process_host = render_frame_host->GetProcess();
render_process_host->FilterURL(false, &validated_url);

Powered by Google App Engine
This is Rietveld 408576698