| OLD | NEW |
| 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/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/fetch/ResourceLoaderOptions.h" // CORSEnabled |
| 9 #include "core/loader/PingLoader.h" | 10 #include "core/loader/PingLoader.h" |
| 10 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 11 #include "public/platform/WebURLLoaderClient.h" | 12 #include "public/platform/WebURLLoaderClient.h" |
| 12 #include "wtf/Forward.h" | 13 #include "wtf/Forward.h" |
| 13 #include "wtf/Noncopyable.h" | 14 #include "wtf/Noncopyable.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class Blob; | 18 class Blob; |
| 18 class DOMArrayBufferView; | 19 class DOMArrayBufferView; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 29 ~BeaconLoader() override { } | 30 ~BeaconLoader() override { } |
| 30 | 31 |
| 31 static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&); | 32 static bool sendBeacon(LocalFrame*, int, const KURL&, const String&, int&); |
| 32 static bool sendBeacon(LocalFrame*, int, const KURL&, DOMArrayBufferView*, i
nt&); | 33 static bool sendBeacon(LocalFrame*, int, const KURL&, DOMArrayBufferView*, i
nt&); |
| 33 static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&); | 34 static bool sendBeacon(LocalFrame*, int, const KURL&, Blob*, int&); |
| 34 static bool sendBeacon(LocalFrame*, int, const KURL&, FormData*, int&); | 35 static bool sendBeacon(LocalFrame*, int, const KURL&, FormData*, int&); |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 class Sender; | 38 class Sender; |
| 38 | 39 |
| 39 BeaconLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, Store
dCredentials); | 40 BeaconLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, Store
dCredentials, CORSEnabled); |
| 40 | 41 |
| 41 RefPtr<SecurityOrigin> m_beaconOrigin; | 42 RefPtr<SecurityOrigin> m_beaconOrigin; |
| 43 bool m_redirectsFollowCORS; |
| 42 | 44 |
| 43 // WebURLLoaderClient | 45 // WebURLLoaderClient |
| 44 void willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse&
, int64_t encodedDataLength) override; | 46 void willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse&
, int64_t encodedDataLength) override; |
| 45 }; | 47 }; |
| 46 | 48 |
| 47 } // namespace blink | 49 } // namespace blink |
| 48 | 50 |
| 49 #endif // BeaconLoader_h | 51 #endif // BeaconLoader_h |
| OLD | NEW |