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 #include "modules/beacon/NavigatorBeacon.h" | 5 #include "modules/beacon/NavigatorBeacon.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
9 #include "bindings/modules/v8/ArrayBufferViewOrBlobOrStringOrFormData.h" | 9 #include "bindings/modules/v8/ArrayBufferViewOrBlobOrStringOrFormData.h" |
10 #include "core/dom/DOMArrayBufferView.h" | 10 #include "core/dom/DOMArrayBufferView.h" |
11 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
12 #include "core/dom/ExecutionContext.h" | 12 #include "core/dom/ExecutionContext.h" |
13 #include "core/fetch/FetchUtils.h" | |
14 #include "core/fileapi/Blob.h" | 13 #include "core/fileapi/Blob.h" |
15 #include "core/frame/LocalFrame.h" | 14 #include "core/frame/LocalFrame.h" |
16 #include "core/frame/Settings.h" | 15 #include "core/frame/Settings.h" |
17 #include "core/frame/UseCounter.h" | 16 #include "core/frame/UseCounter.h" |
18 #include "core/frame/csp/ContentSecurityPolicy.h" | 17 #include "core/frame/csp/ContentSecurityPolicy.h" |
19 #include "core/html/FormData.h" | 18 #include "core/html/FormData.h" |
20 #include "core/loader/PingLoader.h" | 19 #include "core/loader/PingLoader.h" |
| 20 #include "platform/loader/fetch/FetchUtils.h" |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
24 NavigatorBeacon::NavigatorBeacon(Navigator& navigator) | 24 NavigatorBeacon::NavigatorBeacon(Navigator& navigator) |
25 : Supplement<Navigator>(navigator), m_transmittedBytes(0) {} | 25 : Supplement<Navigator>(navigator), m_transmittedBytes(0) {} |
26 | 26 |
27 NavigatorBeacon::~NavigatorBeacon() {} | 27 NavigatorBeacon::~NavigatorBeacon() {} |
28 | 28 |
29 DEFINE_TRACE(NavigatorBeacon) { | 29 DEFINE_TRACE(NavigatorBeacon) { |
30 Supplement<Navigator>::trace(visitor); | 30 Supplement<Navigator>::trace(visitor); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 if (allowed) { | 150 if (allowed) { |
151 addTransmittedBytes(bytes); | 151 addTransmittedBytes(bytes); |
152 return true; | 152 return true; |
153 } | 153 } |
154 | 154 |
155 UseCounter::count(context, UseCounter::SendBeaconQuotaExceeded); | 155 UseCounter::count(context, UseCounter::SendBeaconQuotaExceeded); |
156 return false; | 156 return false; |
157 } | 157 } |
158 | 158 |
159 } // namespace blink | 159 } // namespace blink |
OLD | NEW |