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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/loader/BeaconLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/BeaconLoader.h
diff --git a/Source/core/loader/BeaconLoader.h b/Source/core/loader/BeaconLoader.h
index aa13b61b724824cb3ddb2b8cd09b2f2c4c520166..64f44a6a24704cfb80303967b2da4ab7ac9d4d2a 100644
--- a/Source/core/loader/BeaconLoader.h
+++ b/Source/core/loader/BeaconLoader.h
@@ -7,6 +7,8 @@
#include "core/loader/PingLoader.h"
#include "platform/heap/Handle.h"
+#include "public/platform/WebURLLoaderClient.h"
+#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
namespace blink {
@@ -16,6 +18,7 @@ class DOMArrayBufferView;
class DOMFormData;
class KURL;
class LocalFrame;
+class SecurityOrigin;
// Issue asynchronous beacon transmission loads independent of LocalFrame
// staying alive. PingLoader providing the service.
@@ -23,7 +26,7 @@ class BeaconLoader final : public PingLoader {
WTF_MAKE_NONCOPYABLE(BeaconLoader);
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- virtual ~BeaconLoader() { }
+ ~BeaconLoader() override { }
static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&);
static bool sendBeacon(LocalFrame*, int, const KURL&, PassRefPtr<DOMArrayBufferView>, int&);
@@ -32,6 +35,13 @@ public:
private:
class Sender;
+
+ BeaconLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredCredentials);
+
+ RefPtr<SecurityOrigin> m_beaconOrigin;
+
+ // WebURLLoaderClient
+ void willSendRequest(WebURLLoader*, WebURLRequest&, const WebURLResponse&) override;
};
} // namespace blink
« 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