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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2196333002: PlzNavigate: Clear provisional history item on redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timing_api
Patch Set: Addressed comments (2) Created 4 years, 4 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: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index 89f4ce5200c44ef3153caedbc6ca774f0abc10bf..9bfd75a12796024dae78e0e901303167390625d0 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -209,6 +209,18 @@ Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques
return resource;
}
+void DocumentLoader::didRedirect(const KURL& oldURL, const KURL& newURL)
Nate Chapin 2016/08/17 23:45:52 Is there some redundant code between this and redi
arthursonzogni 2016/08/18 09:21:38 I tried to use didRedirect in redirectReceived. No
+{
+ timing().addRedirect(oldURL, newURL);
+
+ // If a redirection happens during a back/forward navigation, don't restore
+ // any state from the old HistoryItem.
+ // There is a provisional history item for back/forward navigation only.
+ // In the other case, clearing it is a no-op.
+ DCHECK(frameLoader());
+ frameLoader()->discardProvisionalHistoryItem();
+}
+
void DocumentLoader::dispatchLinkHeaderPreloads(ViewportDescriptionWrapper* viewport, LinkLoader::MediaPreloadPolicy mediaPolicy)
{
LinkLoader::loadLinksFromHeader(response().httpHeaderField(HTTPNames::Link), response().url(), m_frame->document(), NetworkHintsInterfaceImpl(), LinkLoader::OnlyLoadResources, mediaPolicy, viewport);

Powered by Google App Engine
This is Rietveld 408576698