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

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 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..41cf85ddb56946cc17e25c285a97618df78aec81 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -209,6 +209,17 @@ Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques
return resource;
}
+void DocumentLoader::addExternalRedirect(const KURL& oldURL, const KURL& newURL)
+{
+ timing().addRedirect(oldURL, newURL);
+
+ // If a redirection happens during a back/forward navigation, don't restore
+ // any state from the old HistoryItem.
Charlie Reis 2016/08/11 21:05:01 It's probably worth mentioning that we only have a
arthursonzogni 2016/08/16 09:26:20 Done.
+ FrameLoader* frameloader = frameLoader();
Charlie Reis 2016/08/11 21:05:01 nit: No need to declare this. (If we did have it,
arthursonzogni 2016/08/16 09:26:20 Done.
+ if (frameloader)
Charlie Reis 2016/08/11 21:05:01 Is it possible for frameLoader() to return null he
arthursonzogni 2016/08/16 09:26:20 I am sure that where the function is called (in Re
+ 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