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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h

Issue 2151693009: Preserve referrer across CORS-enabled redirects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 5 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/DocumentThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
index 972996099f31033f8868e9484e7961eeec568725..27ad6a6838b21e7de01bcc37904071a3a43cf17d 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
@@ -40,6 +40,7 @@
#include "platform/heap/Handle.h"
#include "platform/network/HTTPHeaderMap.h"
#include "platform/network/ResourceError.h"
+#include "platform/weborigin/Referrer.h"
#include "wtf/Forward.h"
#include "wtf/WeakPtr.h"
#include "wtf/text/WTFString.h"
@@ -224,6 +225,12 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader, priv
WebURLRequest::FetchRedirectMode m_redirectMode;
+ // Holds the referrer after a redirect response was
+ // received. This referrer is used to populate the HTTP Referer
+ // header when following the redirect.
+ bool m_didRedirect;
+ Referrer m_referrerAfterRedirect;
+
WeakPtrFactory<DocumentThreadableLoader> m_weakFactory;
};

Powered by Google App Engine
This is Rietveld 408576698