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

Unified Diff: chrome/browser/prerender/prerender_contents.cc

Issue 2656653002: Suppress NEW_NAVIGATION_ENTRY prerenderer failures for ORIGIN_OFFLINE (Closed)
Patch Set: Fixes comparison and adds browser test. Created 3 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: chrome/browser/prerender/prerender_contents.cc
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index aea147d28bf082ac2336cfc8edae770afc03b79b..991ca9df2a0aaeac6f0f44d03abdcc8db62b0f44 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -577,6 +577,10 @@ void PrerenderContents::DidFinishLoad(
void PrerenderContents::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
+ // Offline requests are not subject to navigation and use of history.
pasko 2017/01/26 12:09:39 I'd prefer something more verbose as a comment, li
dougarnett 2017/01/26 16:27:39 Done.
+ if (origin() == ORIGIN_OFFLINE)
+ return;
+
// If the prerender made a second navigation entry, abort the prerender. This
// avoids having to correctly implement a complex history merging case (this
// interacts with location.replace) and correctly synchronize with the

Powered by Google App Engine
This is Rietveld 408576698