OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 m_appCacheID(0), | 92 m_appCacheID(0), |
93 m_wasFetchedViaSPDY(false), | 93 m_wasFetchedViaSPDY(false), |
94 m_wasNpnNegotiated(false), | 94 m_wasNpnNegotiated(false), |
95 m_wasAlternateProtocolAvailable(false), | 95 m_wasAlternateProtocolAvailable(false), |
96 m_wasFetchedViaProxy(false), | 96 m_wasFetchedViaProxy(false), |
97 m_wasFetchedViaServiceWorker(false), | 97 m_wasFetchedViaServiceWorker(false), |
98 m_wasFetchedViaForeignFetch(false), | 98 m_wasFetchedViaForeignFetch(false), |
99 m_wasFallbackRequiredByServiceWorker(false), | 99 m_wasFallbackRequiredByServiceWorker(false), |
100 m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault), | 100 m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault), |
101 m_responseTime(0), | 101 m_responseTime(0), |
| 102 m_responseStart(0), |
102 m_remotePort(0), | 103 m_remotePort(0), |
103 m_encodedDataLength(0), | 104 m_encodedDataLength(0), |
104 m_encodedBodyLength(0), | 105 m_encodedBodyLength(0), |
105 m_decodedBodyLength(0) {} | 106 m_decodedBodyLength(0) {} |
106 | 107 |
107 ResourceResponse::ResourceResponse(const KURL& url, | 108 ResourceResponse::ResourceResponse(const KURL& url, |
108 const AtomicString& mimeType, | 109 const AtomicString& mimeType, |
109 long long expectedLength, | 110 long long expectedLength, |
110 const AtomicString& textEncodingName, | 111 const AtomicString& textEncodingName, |
111 const String& filename) | 112 const String& filename) |
(...skipping 22 matching lines...) Expand all Loading... |
134 m_appCacheID(0), | 135 m_appCacheID(0), |
135 m_wasFetchedViaSPDY(false), | 136 m_wasFetchedViaSPDY(false), |
136 m_wasNpnNegotiated(false), | 137 m_wasNpnNegotiated(false), |
137 m_wasAlternateProtocolAvailable(false), | 138 m_wasAlternateProtocolAvailable(false), |
138 m_wasFetchedViaProxy(false), | 139 m_wasFetchedViaProxy(false), |
139 m_wasFetchedViaServiceWorker(false), | 140 m_wasFetchedViaServiceWorker(false), |
140 m_wasFetchedViaForeignFetch(false), | 141 m_wasFetchedViaForeignFetch(false), |
141 m_wasFallbackRequiredByServiceWorker(false), | 142 m_wasFallbackRequiredByServiceWorker(false), |
142 m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault), | 143 m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault), |
143 m_responseTime(0), | 144 m_responseTime(0), |
| 145 m_responseStart(0), |
144 m_remotePort(0), | 146 m_remotePort(0), |
145 m_encodedDataLength(0), | 147 m_encodedDataLength(0), |
146 m_encodedBodyLength(0), | 148 m_encodedBodyLength(0), |
147 m_decodedBodyLength(0) {} | 149 m_decodedBodyLength(0) {} |
148 | 150 |
149 ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data) | 151 ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data) |
150 : ResourceResponse() { | 152 : ResourceResponse() { |
151 setURL(data->m_url); | 153 setURL(data->m_url); |
152 setMimeType(AtomicString(data->m_mimeType)); | 154 setMimeType(AtomicString(data->m_mimeType)); |
153 setExpectedContentLength(data->m_expectedContentLength); | 155 setExpectedContentLength(data->m_expectedContentLength); |
(...skipping 30 matching lines...) Expand all Loading... |
184 m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable; | 186 m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvailable; |
185 m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; | 187 m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; |
186 m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; | 188 m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; |
187 m_wasFetchedViaForeignFetch = data->m_wasFetchedViaForeignFetch; | 189 m_wasFetchedViaForeignFetch = data->m_wasFetchedViaForeignFetch; |
188 m_wasFallbackRequiredByServiceWorker = | 190 m_wasFallbackRequiredByServiceWorker = |
189 data->m_wasFallbackRequiredByServiceWorker; | 191 data->m_wasFallbackRequiredByServiceWorker; |
190 m_serviceWorkerResponseType = data->m_serviceWorkerResponseType; | 192 m_serviceWorkerResponseType = data->m_serviceWorkerResponseType; |
191 m_urlListViaServiceWorker = data->m_urlListViaServiceWorker; | 193 m_urlListViaServiceWorker = data->m_urlListViaServiceWorker; |
192 m_cacheStorageCacheName = data->m_cacheStorageCacheName; | 194 m_cacheStorageCacheName = data->m_cacheStorageCacheName; |
193 m_responseTime = data->m_responseTime; | 195 m_responseTime = data->m_responseTime; |
| 196 m_responseStart = data->m_responseStart; |
194 m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); | 197 m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); |
195 m_remotePort = data->m_remotePort; | 198 m_remotePort = data->m_remotePort; |
196 m_encodedDataLength = data->m_encodedDataLength; | 199 m_encodedDataLength = data->m_encodedDataLength; |
197 m_encodedBodyLength = data->m_encodedBodyLength; | 200 m_encodedBodyLength = data->m_encodedBodyLength; |
198 m_decodedBodyLength = data->m_decodedBodyLength; | 201 m_decodedBodyLength = data->m_decodedBodyLength; |
199 m_downloadedFilePath = data->m_downloadedFilePath; | 202 m_downloadedFilePath = data->m_downloadedFilePath; |
200 m_downloadedFileHandle = data->m_downloadedFileHandle; | 203 m_downloadedFileHandle = data->m_downloadedFileHandle; |
201 | 204 |
202 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support | 205 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support |
203 // whatever values may be present in the opaque m_extraData structure. | 206 // whatever values may be present in the opaque m_extraData structure. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 data->m_wasFallbackRequiredByServiceWorker = | 256 data->m_wasFallbackRequiredByServiceWorker = |
254 m_wasFallbackRequiredByServiceWorker; | 257 m_wasFallbackRequiredByServiceWorker; |
255 data->m_serviceWorkerResponseType = m_serviceWorkerResponseType; | 258 data->m_serviceWorkerResponseType = m_serviceWorkerResponseType; |
256 data->m_urlListViaServiceWorker.resize(m_urlListViaServiceWorker.size()); | 259 data->m_urlListViaServiceWorker.resize(m_urlListViaServiceWorker.size()); |
257 std::transform(m_urlListViaServiceWorker.begin(), | 260 std::transform(m_urlListViaServiceWorker.begin(), |
258 m_urlListViaServiceWorker.end(), | 261 m_urlListViaServiceWorker.end(), |
259 data->m_urlListViaServiceWorker.begin(), | 262 data->m_urlListViaServiceWorker.begin(), |
260 [](const KURL& url) { return url.copy(); }); | 263 [](const KURL& url) { return url.copy(); }); |
261 data->m_cacheStorageCacheName = cacheStorageCacheName().isolatedCopy(); | 264 data->m_cacheStorageCacheName = cacheStorageCacheName().isolatedCopy(); |
262 data->m_responseTime = m_responseTime; | 265 data->m_responseTime = m_responseTime; |
| 266 data->m_responseStart = m_responseStart; |
263 data->m_remoteIPAddress = m_remoteIPAddress.getString().isolatedCopy(); | 267 data->m_remoteIPAddress = m_remoteIPAddress.getString().isolatedCopy(); |
264 data->m_remotePort = m_remotePort; | 268 data->m_remotePort = m_remotePort; |
265 data->m_encodedDataLength = m_encodedDataLength; | 269 data->m_encodedDataLength = m_encodedDataLength; |
266 data->m_encodedBodyLength = m_encodedBodyLength; | 270 data->m_encodedBodyLength = m_encodedBodyLength; |
267 data->m_decodedBodyLength = m_decodedBodyLength; | 271 data->m_decodedBodyLength = m_decodedBodyLength; |
268 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); | 272 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); |
269 data->m_downloadedFileHandle = m_downloadedFileHandle; | 273 data->m_downloadedFileHandle = m_downloadedFileHandle; |
270 | 274 |
271 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support | 275 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support |
272 // whatever values may be present in the opaque m_extraData structure. | 276 // whatever values may be present in the opaque m_extraData structure. |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 if (a.resourceLoadTiming() != b.resourceLoadTiming()) | 664 if (a.resourceLoadTiming() != b.resourceLoadTiming()) |
661 return false; | 665 return false; |
662 if (a.encodedBodyLength() != b.encodedBodyLength()) | 666 if (a.encodedBodyLength() != b.encodedBodyLength()) |
663 return false; | 667 return false; |
664 if (a.decodedBodyLength() != b.decodedBodyLength()) | 668 if (a.decodedBodyLength() != b.decodedBodyLength()) |
665 return false; | 669 return false; |
666 return true; | 670 return true; |
667 } | 671 } |
668 | 672 |
669 } // namespace blink | 673 } // namespace blink |
OLD | NEW |