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

Side by Side Diff: Source/core/loader/BeaconLoader.h

Issue 1016373002: Perform CORS access checks on Beacon redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased + add mixed content test Created 5 years, 9 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
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/loader/BeaconLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BeaconLoader_h 5 #ifndef BeaconLoader_h
6 #define BeaconLoader_h 6 #define BeaconLoader_h
7 7
8 #include "core/loader/PingLoader.h" 8 #include "core/loader/PingLoader.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebURLLoaderClient.h"
11 #include "wtf/Forward.h"
10 #include "wtf/Noncopyable.h" 12 #include "wtf/Noncopyable.h"
11 13
12 namespace blink { 14 namespace blink {
13 15
14 class Blob; 16 class Blob;
15 class DOMArrayBufferView; 17 class DOMArrayBufferView;
16 class DOMFormData; 18 class DOMFormData;
17 class KURL; 19 class KURL;
18 class LocalFrame; 20 class LocalFrame;
21 class SecurityOrigin;
19 22
20 // Issue asynchronous beacon transmission loads independent of LocalFrame 23 // Issue asynchronous beacon transmission loads independent of LocalFrame
21 // staying alive. PingLoader providing the service. 24 // staying alive. PingLoader providing the service.
22 class BeaconLoader final : public PingLoader { 25 class BeaconLoader final : public PingLoader {
23 WTF_MAKE_NONCOPYABLE(BeaconLoader); 26 WTF_MAKE_NONCOPYABLE(BeaconLoader);
24 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 27 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
25 public: 28 public:
26 virtual ~BeaconLoader() { } 29 ~BeaconLoader() override { }
27 30
28 static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&); 31 static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&);
29 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<DOMArrayBuf ferView>, int&); 32 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<DOMArrayBuf ferView>, int&);
30 static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&); 33 static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&);
31 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtrWillBeRawPtr <DOMFormData>, int&); 34 static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtrWillBeRawPtr <DOMFormData>, int&);
32 35
33 private: 36 private:
34 class Sender; 37 class Sender;
38
39 BeaconLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, Store dCredentials);
40
41 RefPtr<SecurityOrigin> m_beaconOrigin;
42
43 // WebURLLoaderClient
44 void willSendRequest(WebURLLoader*, WebURLRequest&, const WebURLResponse&) o verride;
35 }; 45 };
36 46
37 } // namespace blink 47 } // namespace blink
38 48
39 #endif // BeaconLoader_h 49 #endif // BeaconLoader_h
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/loader/BeaconLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698