OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 // Issue an asynchronous, one-directional request at some resources, ignoring | 51 // Issue an asynchronous, one-directional request at some resources, ignoring |
52 // any response. The request is made independent of any LocalFrame staying alive
, | 52 // any response. The request is made independent of any LocalFrame staying alive
, |
53 // and must only stay alive until the transmission has completed successfully | 53 // and must only stay alive until the transmission has completed successfully |
54 // (or not -- errors are not propagated back either.) Upon transmission, the | 54 // (or not -- errors are not propagated back either.) Upon transmission, the |
55 // the load is cancelled and the loader cancels itself. | 55 // the load is cancelled and the loader cancels itself. |
56 // | 56 // |
57 // The ping loader is used by audit pings, beacon transmissions and image loads | 57 // The ping loader is used by audit pings, beacon transmissions and image loads |
58 // during page unloading. | 58 // during page unloading. |
59 // | 59 // |
60 class CORE_EXPORT PingLoader : public RefCountedWillBeRefCountedGarbageCollected
<PingLoader>, public LocalFrameLifecycleObserver, private WebURLLoaderClient { | 60 class CORE_EXPORT PingLoader : public RefCountedGarbageCollected<PingLoader>, pu
blic LocalFrameLifecycleObserver, private WebURLLoaderClient { |
61 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PingLoader); | 61 USING_GARBAGE_COLLECTED_MIXIN(PingLoader); |
62 WTF_MAKE_NONCOPYABLE(PingLoader); | 62 WTF_MAKE_NONCOPYABLE(PingLoader); |
63 USING_FAST_MALLOC_WILL_BE_REMOVED(PingLoader); | |
64 public: | 63 public: |
65 ~PingLoader() override; | 64 ~PingLoader() override; |
66 | 65 |
67 enum ViolationReportType { | 66 enum ViolationReportType { |
68 ContentSecurityPolicyViolationReport, | 67 ContentSecurityPolicyViolationReport, |
69 XSSAuditorViolationReport | 68 XSSAuditorViolationReport |
70 }; | 69 }; |
71 | 70 |
72 static void loadImage(LocalFrame*, const KURL&); | 71 static void loadImage(LocalFrame*, const KURL&); |
73 static void sendLinkAuditPing(LocalFrame*, const KURL& pingURL, const KURL&
destinationURL); | 72 static void sendLinkAuditPing(LocalFrame*, const KURL& pingURL, const KURL&
destinationURL); |
(...skipping 23 matching lines...) Expand all Loading... |
97 | 96 |
98 OwnPtr<WebURLLoader> m_loader; | 97 OwnPtr<WebURLLoader> m_loader; |
99 Timer<PingLoader> m_timeout; | 98 Timer<PingLoader> m_timeout; |
100 String m_url; | 99 String m_url; |
101 unsigned long m_identifier; | 100 unsigned long m_identifier; |
102 }; | 101 }; |
103 | 102 |
104 } // namespace blink | 103 } // namespace blink |
105 | 104 |
106 #endif // PingLoader_h | 105 #endif // PingLoader_h |
OLD | NEW |