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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 , m_expires(0.0) | 49 , m_expires(0.0) |
50 , m_lastModified(0.0) | 50 , m_lastModified(0.0) |
51 , m_httpVersion(Unknown) | 51 , m_httpVersion(Unknown) |
52 , m_appCacheID(0) | 52 , m_appCacheID(0) |
53 , m_isMultipartPayload(false) | 53 , m_isMultipartPayload(false) |
54 , m_wasFetchedViaSPDY(false) | 54 , m_wasFetchedViaSPDY(false) |
55 , m_wasNpnNegotiated(false) | 55 , m_wasNpnNegotiated(false) |
56 , m_wasAlternateProtocolAvailable(false) | 56 , m_wasAlternateProtocolAvailable(false) |
57 , m_wasFetchedViaProxy(false) | 57 , m_wasFetchedViaProxy(false) |
58 , m_wasFetchedViaServiceWorker(false) | 58 , m_wasFetchedViaServiceWorker(false) |
| 59 , m_wasFallbackRequiredByServiceWorker(false) |
59 , m_responseTime(0) | 60 , m_responseTime(0) |
60 , m_remotePort(0) | 61 , m_remotePort(0) |
61 { | 62 { |
62 } | 63 } |
63 | 64 |
64 ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType
, long long expectedLength, const AtomicString& textEncodingName, const String&
filename) | 65 ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType
, long long expectedLength, const AtomicString& textEncodingName, const String&
filename) |
65 : m_url(url) | 66 : m_url(url) |
66 , m_mimeType(mimeType) | 67 , m_mimeType(mimeType) |
67 , m_expectedContentLength(expectedLength) | 68 , m_expectedContentLength(expectedLength) |
68 , m_textEncodingName(textEncodingName) | 69 , m_textEncodingName(textEncodingName) |
(...skipping 13 matching lines...) Expand all Loading... |
82 , m_expires(0.0) | 83 , m_expires(0.0) |
83 , m_lastModified(0.0) | 84 , m_lastModified(0.0) |
84 , m_httpVersion(Unknown) | 85 , m_httpVersion(Unknown) |
85 , m_appCacheID(0) | 86 , m_appCacheID(0) |
86 , m_isMultipartPayload(false) | 87 , m_isMultipartPayload(false) |
87 , m_wasFetchedViaSPDY(false) | 88 , m_wasFetchedViaSPDY(false) |
88 , m_wasNpnNegotiated(false) | 89 , m_wasNpnNegotiated(false) |
89 , m_wasAlternateProtocolAvailable(false) | 90 , m_wasAlternateProtocolAvailable(false) |
90 , m_wasFetchedViaProxy(false) | 91 , m_wasFetchedViaProxy(false) |
91 , m_wasFetchedViaServiceWorker(false) | 92 , m_wasFetchedViaServiceWorker(false) |
| 93 , m_wasFallbackRequiredByServiceWorker(false) |
92 , m_responseTime(0) | 94 , m_responseTime(0) |
93 , m_remotePort(0) | 95 , m_remotePort(0) |
94 { | 96 { |
95 } | 97 } |
96 | 98 |
97 PassOwnPtr<ResourceResponse> ResourceResponse::adopt(PassOwnPtr<CrossThreadResou
rceResponseData> data) | 99 PassOwnPtr<ResourceResponse> ResourceResponse::adopt(PassOwnPtr<CrossThreadResou
rceResponseData> data) |
98 { | 100 { |
99 OwnPtr<ResourceResponse> response = adoptPtr(new ResourceResponse); | 101 OwnPtr<ResourceResponse> response = adoptPtr(new ResourceResponse); |
100 response->setURL(data->m_url); | 102 response->setURL(data->m_url); |
101 response->setMimeType(AtomicString(data->m_mimeType)); | 103 response->setMimeType(AtomicString(data->m_mimeType)); |
(...skipping 10 matching lines...) Expand all Loading... |
112 response->m_securityInfo = data->m_securityInfo; | 114 response->m_securityInfo = data->m_securityInfo; |
113 response->m_httpVersion = data->m_httpVersion; | 115 response->m_httpVersion = data->m_httpVersion; |
114 response->m_appCacheID = data->m_appCacheID; | 116 response->m_appCacheID = data->m_appCacheID; |
115 response->m_appCacheManifestURL = data->m_appCacheManifestURL.copy(); | 117 response->m_appCacheManifestURL = data->m_appCacheManifestURL.copy(); |
116 response->m_isMultipartPayload = data->m_isMultipartPayload; | 118 response->m_isMultipartPayload = data->m_isMultipartPayload; |
117 response->m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY; | 119 response->m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY; |
118 response->m_wasNpnNegotiated = data->m_wasNpnNegotiated; | 120 response->m_wasNpnNegotiated = data->m_wasNpnNegotiated; |
119 response->m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvai
lable; | 121 response->m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvai
lable; |
120 response->m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; | 122 response->m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; |
121 response->m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; | 123 response->m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; |
| 124 response->m_wasFallbackRequiredByServiceWorker = data->m_wasFallbackRequired
ByServiceWorker; |
122 response->m_responseTime = data->m_responseTime; | 125 response->m_responseTime = data->m_responseTime; |
123 response->m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); | 126 response->m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); |
124 response->m_remotePort = data->m_remotePort; | 127 response->m_remotePort = data->m_remotePort; |
125 response->m_downloadedFilePath = data->m_downloadedFilePath; | 128 response->m_downloadedFilePath = data->m_downloadedFilePath; |
126 response->m_downloadedFileHandle = data->m_downloadedFileHandle; | 129 response->m_downloadedFileHandle = data->m_downloadedFileHandle; |
127 | 130 |
128 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support | 131 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support |
129 // whatever values may be present in the opaque m_extraData structure. | 132 // whatever values may be present in the opaque m_extraData structure. |
130 | 133 |
131 return response.release(); | 134 return response.release(); |
(...skipping 16 matching lines...) Expand all Loading... |
148 data->m_securityInfo = CString(m_securityInfo.data(), m_securityInfo.length(
)); | 151 data->m_securityInfo = CString(m_securityInfo.data(), m_securityInfo.length(
)); |
149 data->m_httpVersion = m_httpVersion; | 152 data->m_httpVersion = m_httpVersion; |
150 data->m_appCacheID = m_appCacheID; | 153 data->m_appCacheID = m_appCacheID; |
151 data->m_appCacheManifestURL = m_appCacheManifestURL.copy(); | 154 data->m_appCacheManifestURL = m_appCacheManifestURL.copy(); |
152 data->m_isMultipartPayload = m_isMultipartPayload; | 155 data->m_isMultipartPayload = m_isMultipartPayload; |
153 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY; | 156 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY; |
154 data->m_wasNpnNegotiated = m_wasNpnNegotiated; | 157 data->m_wasNpnNegotiated = m_wasNpnNegotiated; |
155 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable; | 158 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable; |
156 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy; | 159 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy; |
157 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker; | 160 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker; |
| 161 data->m_wasFallbackRequiredByServiceWorker = m_wasFallbackRequiredByServiceW
orker; |
158 data->m_responseTime = m_responseTime; | 162 data->m_responseTime = m_responseTime; |
159 data->m_remoteIPAddress = m_remoteIPAddress.string().isolatedCopy(); | 163 data->m_remoteIPAddress = m_remoteIPAddress.string().isolatedCopy(); |
160 data->m_remotePort = m_remotePort; | 164 data->m_remotePort = m_remotePort; |
161 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); | 165 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); |
162 data->m_downloadedFileHandle = m_downloadedFileHandle; | 166 data->m_downloadedFileHandle = m_downloadedFileHandle; |
163 | 167 |
164 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support | 168 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support |
165 // whatever values may be present in the opaque m_extraData structure. | 169 // whatever values may be present in the opaque m_extraData structure. |
166 | 170 |
167 return data.release(); | 171 return data.release(); |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 if (a.httpHeaderFields() != b.httpHeaderFields()) | 528 if (a.httpHeaderFields() != b.httpHeaderFields()) |
525 return false; | 529 return false; |
526 if (a.resourceLoadTiming() && b.resourceLoadTiming() && *a.resourceLoadTimin
g() == *b.resourceLoadTiming()) | 530 if (a.resourceLoadTiming() && b.resourceLoadTiming() && *a.resourceLoadTimin
g() == *b.resourceLoadTiming()) |
527 return true; | 531 return true; |
528 if (a.resourceLoadTiming() != b.resourceLoadTiming()) | 532 if (a.resourceLoadTiming() != b.resourceLoadTiming()) |
529 return false; | 533 return false; |
530 return true; | 534 return true; |
531 } | 535 } |
532 | 536 |
533 } | 537 } |
OLD | NEW |