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

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

Issue 2180423005: Remove unnecessary eager finalization of PingLoaders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ContentSecurityPolicyViolationReport, 69 ContentSecurityPolicyViolationReport,
70 XSSAuditorViolationReport 70 XSSAuditorViolationReport
71 }; 71 };
72 72
73 static void loadImage(LocalFrame*, const KURL&); 73 static void loadImage(LocalFrame*, const KURL&);
74 static void sendLinkAuditPing(LocalFrame*, const KURL& pingURL, const KURL& destinationURL); 74 static void sendLinkAuditPing(LocalFrame*, const KURL& pingURL, const KURL& destinationURL);
75 static void sendViolationReport(LocalFrame*, const KURL& reportURL, PassRefP tr<EncodedFormData> report, ViolationReportType); 75 static void sendViolationReport(LocalFrame*, const KURL& reportURL, PassRefP tr<EncodedFormData> report, ViolationReportType);
76 76
77 DECLARE_VIRTUAL_TRACE(); 77 DECLARE_VIRTUAL_TRACE();
78 78
79 // Promptly finalize m_loader.
80 EAGERLY_FINALIZE();
81
82 protected: 79 protected:
83 PingLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredC redentials); 80 PingLoader(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredC redentials);
84 81
85 static void start(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredCredentials = AllowStoredCredentials); 82 static void start(LocalFrame*, ResourceRequest&, const FetchInitiatorInfo&, StoredCredentials = AllowStoredCredentials);
86 83
87 void dispose(); 84 void dispose();
88 85
89 private: 86 private:
90 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) final; 87 void didReceiveResponse(WebURLLoader*, const WebURLResponse&) final;
91 void didReceiveData(WebURLLoader*, const char*, int, int, int) final; 88 void didReceiveData(WebURLLoader*, const char*, int, int, int) final;
92 void didFinishLoading(WebURLLoader*, double, int64_t) final; 89 void didFinishLoading(WebURLLoader*, double, int64_t) final;
93 void didFail(WebURLLoader*, const WebURLError&) final; 90 void didFail(WebURLLoader*, const WebURLError&) final;
94 91
95 void timeout(Timer<PingLoader>*); 92 void timeout(Timer<PingLoader>*);
96 93
97 void didFailLoading(LocalFrame*); 94 void didFailLoading(LocalFrame*);
98 95
99 std::unique_ptr<WebURLLoader> m_loader; 96 std::unique_ptr<WebURLLoader> m_loader;
100 Timer<PingLoader> m_timeout; 97 Timer<PingLoader> m_timeout;
101 String m_url; 98 String m_url;
102 unsigned long m_identifier; 99 unsigned long m_identifier;
103 SelfKeepAlive<PingLoader> m_keepAlive; 100 SelfKeepAlive<PingLoader> m_keepAlive;
104 }; 101 };
105 102
106 } // namespace blink 103 } // namespace blink
107 104
108 #endif // PingLoader_h 105 #endif // PingLoader_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698