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; |