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

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

Issue 2653953005: PlzNavigate: transmit redirect info to the renderer side (Closed)
Patch Set: Rebase + addressed comments Created 3 years, 10 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 c527aa4cdb4991379ed1ef089b62b86059076e64..bf3600527ec6d7b60dbd5f45e2e1ee851a01001f 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -227,15 +227,6 @@ Resource* DocumentLoader::startPreload(Resource::Type type,
return resource;
}
-void DocumentLoader::didRedirect(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. There is a provisional history item for
- // back/forward navigation only. In the other case, clearing it is a no-op.
- frameLoader().clearProvisionalHistoryItem();
-}
-
void DocumentLoader::dispatchLinkHeaderPreloads(
ViewportDescriptionWrapper* viewport,
LinkLoader::MediaPreloadPolicy mediaPolicy) {
@@ -382,7 +373,13 @@ bool DocumentLoader::redirectReceived(
DCHECK(timing().fetchStart());
appendRedirect(requestURL);
- didRedirect(redirectResponse.url(), requestURL);
+ timing().addRedirect(redirectResponse.url(), requestURL);
+
+ // 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.
+ frameLoader().clearProvisionalHistoryItem();
+
frameLoaderClient().dispatchDidReceiveServerRedirectForProvisionalLoad();
return true;
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.h ('k') | third_party/WebKit/Source/web/WebDataSourceImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698