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

Side by Side Diff: third_party/WebKit/Source/core/loader/PingLoader.h

Issue 1635113002: Promptly let go of WebURLLoader objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix decls.. Created 4 years, 11 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 | « third_party/WebKit/Source/core/fetch/ResourceLoader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ContentSecurityPolicyViolationReport, 68 ContentSecurityPolicyViolationReport,
69 XSSAuditorViolationReport 69 XSSAuditorViolationReport
70 }; 70 };
71 71
72 static void loadImage(LocalFrame*, const KURL&); 72 static void loadImage(LocalFrame*, const KURL&);
73 static void sendLinkAuditPing(LocalFrame*, const KURL& pingURL, const KURL& destinationURL); 73 static void sendLinkAuditPing(LocalFrame*, const KURL& pingURL, const KURL& destinationURL);
74 static void sendViolationReport(LocalFrame*, const KURL& reportURL, PassRefP tr<EncodedFormData> report, ViolationReportType); 74 static void sendViolationReport(LocalFrame*, const KURL& reportURL, PassRefP tr<EncodedFormData> report, ViolationReportType);
75 75
76 DECLARE_VIRTUAL_TRACE(); 76 DECLARE_VIRTUAL_TRACE();
77 77
78 // Promptly finalize m_loader.
79 EAGERLY_FINALIZE();
80
78 protected: 81 protected:
79 PingLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredC redentials); 82 PingLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredC redentials);
80 83
81 static void start(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredCredentials = AllowStoredCredentials); 84 static void start(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredCredentials = AllowStoredCredentials);
82 85
83 void dispose(); 86 void dispose();
84 87
85 private: 88 private:
86 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) final; 89 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) final;
87 void didReceiveData(WebURLLoader*, const char*, int, int) final; 90 void didReceiveData(WebURLLoader*, const char*, int, int) final;
88 void didFinishLoading(WebURLLoader*, double, int64_t) final; 91 void didFinishLoading(WebURLLoader*, double, int64_t) final;
89 void didFail(WebURLLoader*, const WebURLError&) final; 92 void didFail(WebURLLoader*, const WebURLError&) final;
90 93
91 void timeout(Timer<PingLoader>*); 94 void timeout(Timer<PingLoader>*);
92 95
93 void didFailLoading(LocalFrame*); 96 void didFailLoading(LocalFrame*);
94 97
95 OwnPtr<WebURLLoader> m_loader; 98 OwnPtr<WebURLLoader> m_loader;
96 Timer<PingLoader> m_timeout; 99 Timer<PingLoader> m_timeout;
97 String m_url; 100 String m_url;
98 unsigned long m_identifier; 101 unsigned long m_identifier;
99 }; 102 };
100 103
101 } // namespace blink 104 } // namespace blink
102 105
103 #endif // PingLoader_h 106 #endif // PingLoader_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698