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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 22 matching lines...) Expand all
33 #define DocumentThreadableLoader_h 33 #define DocumentThreadableLoader_h
34 34
35 #include "core/CoreExport.h" 35 #include "core/CoreExport.h"
36 #include "core/fetch/RawResource.h" 36 #include "core/fetch/RawResource.h"
37 #include "core/fetch/ResourceOwner.h" 37 #include "core/fetch/ResourceOwner.h"
38 #include "core/loader/ThreadableLoader.h" 38 #include "core/loader/ThreadableLoader.h"
39 #include "platform/Timer.h" 39 #include "platform/Timer.h"
40 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
41 #include "platform/network/HTTPHeaderMap.h" 41 #include "platform/network/HTTPHeaderMap.h"
42 #include "platform/network/ResourceError.h" 42 #include "platform/network/ResourceError.h"
43 #include "platform/weborigin/Referrer.h"
43 #include "wtf/Forward.h" 44 #include "wtf/Forward.h"
44 #include "wtf/WeakPtr.h" 45 #include "wtf/WeakPtr.h"
45 #include "wtf/text/WTFString.h" 46 #include "wtf/text/WTFString.h"
46 #include <memory> 47 #include <memory>
47 48
48 namespace blink { 49 namespace blink {
49 50
50 class Document; 51 class Document;
51 class KURL; 52 class KURL;
52 class ResourceRequest; 53 class ResourceRequest;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 218
218 // Max number of times that this DocumentThreadableLoader can follow 219 // Max number of times that this DocumentThreadableLoader can follow
219 // cross-origin redirects. 220 // cross-origin redirects.
220 // This is used to limit the number of redirects. 221 // This is used to limit the number of redirects.
221 // But this value is not the max number of total redirects allowed, 222 // But this value is not the max number of total redirects allowed,
222 // because same-origin redirects are not counted here. 223 // because same-origin redirects are not counted here.
223 int m_corsRedirectLimit; 224 int m_corsRedirectLimit;
224 225
225 WebURLRequest::FetchRedirectMode m_redirectMode; 226 WebURLRequest::FetchRedirectMode m_redirectMode;
226 227
228 // Holds the referrer after a redirect response was
229 // received. This referrer is used to populate the HTTP Referer
230 // header when following the redirect.
231 bool m_didRedirect;
232 Referrer m_referrerAfterRedirect;
233
227 WeakPtrFactory<DocumentThreadableLoader> m_weakFactory; 234 WeakPtrFactory<DocumentThreadableLoader> m_weakFactory;
228 }; 235 };
229 236
230 } // namespace blink 237 } // namespace blink
231 238
232 #endif // DocumentThreadableLoader_h 239 #endif // DocumentThreadableLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698