| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 , m_date(0.0) | 48 , m_date(0.0) |
| 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_responseTime(0) | 59 , m_responseTime(0) |
| 59 , m_remotePort(0) | 60 , m_remotePort(0) |
| 60 { | 61 { |
| 61 } | 62 } |
| 62 | 63 |
| 63 ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType
, long long expectedLength, const AtomicString& textEncodingName, const String&
filename) | 64 ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType
, long long expectedLength, const AtomicString& textEncodingName, const String&
filename) |
| 64 : m_url(url) | 65 : m_url(url) |
| 65 , m_mimeType(mimeType) | 66 , m_mimeType(mimeType) |
| 66 , m_expectedContentLength(expectedLength) | 67 , m_expectedContentLength(expectedLength) |
| 67 , m_textEncodingName(textEncodingName) | 68 , m_textEncodingName(textEncodingName) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 80 , m_date(0.0) | 81 , m_date(0.0) |
| 81 , m_expires(0.0) | 82 , m_expires(0.0) |
| 82 , m_lastModified(0.0) | 83 , m_lastModified(0.0) |
| 83 , m_httpVersion(Unknown) | 84 , m_httpVersion(Unknown) |
| 84 , m_appCacheID(0) | 85 , m_appCacheID(0) |
| 85 , m_isMultipartPayload(false) | 86 , m_isMultipartPayload(false) |
| 86 , m_wasFetchedViaSPDY(false) | 87 , m_wasFetchedViaSPDY(false) |
| 87 , m_wasNpnNegotiated(false) | 88 , m_wasNpnNegotiated(false) |
| 88 , m_wasAlternateProtocolAvailable(false) | 89 , m_wasAlternateProtocolAvailable(false) |
| 89 , m_wasFetchedViaProxy(false) | 90 , m_wasFetchedViaProxy(false) |
| 91 , m_wasFetchedViaServiceWorker(false) |
| 90 , m_responseTime(0) | 92 , m_responseTime(0) |
| 91 , m_remotePort(0) | 93 , m_remotePort(0) |
| 92 { | 94 { |
| 93 } | 95 } |
| 94 | 96 |
| 95 PassOwnPtr<ResourceResponse> ResourceResponse::adopt(PassOwnPtr<CrossThreadResou
rceResponseData> data) | 97 PassOwnPtr<ResourceResponse> ResourceResponse::adopt(PassOwnPtr<CrossThreadResou
rceResponseData> data) |
| 96 { | 98 { |
| 97 OwnPtr<ResourceResponse> response = adoptPtr(new ResourceResponse); | 99 OwnPtr<ResourceResponse> response = adoptPtr(new ResourceResponse); |
| 98 response->setURL(data->m_url); | 100 response->setURL(data->m_url); |
| 99 response->setMimeType(AtomicString(data->m_mimeType)); | 101 response->setMimeType(AtomicString(data->m_mimeType)); |
| 100 response->setExpectedContentLength(data->m_expectedContentLength); | 102 response->setExpectedContentLength(data->m_expectedContentLength); |
| 101 response->setTextEncodingName(AtomicString(data->m_textEncodingName)); | 103 response->setTextEncodingName(AtomicString(data->m_textEncodingName)); |
| 102 response->setSuggestedFilename(data->m_suggestedFilename); | 104 response->setSuggestedFilename(data->m_suggestedFilename); |
| 103 | 105 |
| 104 response->setHTTPStatusCode(data->m_httpStatusCode); | 106 response->setHTTPStatusCode(data->m_httpStatusCode); |
| 105 response->setHTTPStatusText(AtomicString(data->m_httpStatusText)); | 107 response->setHTTPStatusText(AtomicString(data->m_httpStatusText)); |
| 106 | 108 |
| 107 response->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); | 109 response->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); |
| 108 response->setLastModifiedDate(data->m_lastModifiedDate); | 110 response->setLastModifiedDate(data->m_lastModifiedDate); |
| 109 response->setResourceLoadTiming(data->m_resourceLoadTiming.release()); | 111 response->setResourceLoadTiming(data->m_resourceLoadTiming.release()); |
| 110 response->m_securityInfo = data->m_securityInfo; | 112 response->m_securityInfo = data->m_securityInfo; |
| 111 response->m_httpVersion = data->m_httpVersion; | 113 response->m_httpVersion = data->m_httpVersion; |
| 112 response->m_appCacheID = data->m_appCacheID; | 114 response->m_appCacheID = data->m_appCacheID; |
| 113 response->m_appCacheManifestURL = data->m_appCacheManifestURL.copy(); | 115 response->m_appCacheManifestURL = data->m_appCacheManifestURL.copy(); |
| 114 response->m_isMultipartPayload = data->m_isMultipartPayload; | 116 response->m_isMultipartPayload = data->m_isMultipartPayload; |
| 115 response->m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY; | 117 response->m_wasFetchedViaSPDY = data->m_wasFetchedViaSPDY; |
| 116 response->m_wasNpnNegotiated = data->m_wasNpnNegotiated; | 118 response->m_wasNpnNegotiated = data->m_wasNpnNegotiated; |
| 117 response->m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvai
lable; | 119 response->m_wasAlternateProtocolAvailable = data->m_wasAlternateProtocolAvai
lable; |
| 118 response->m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; | 120 response->m_wasFetchedViaProxy = data->m_wasFetchedViaProxy; |
| 121 response->m_wasFetchedViaServiceWorker = data->m_wasFetchedViaServiceWorker; |
| 119 response->m_responseTime = data->m_responseTime; | 122 response->m_responseTime = data->m_responseTime; |
| 120 response->m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); | 123 response->m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); |
| 121 response->m_remotePort = data->m_remotePort; | 124 response->m_remotePort = data->m_remotePort; |
| 122 response->m_downloadedFilePath = data->m_downloadedFilePath; | 125 response->m_downloadedFilePath = data->m_downloadedFilePath; |
| 123 response->m_downloadedFileHandle = data->m_downloadedFileHandle; | 126 response->m_downloadedFileHandle = data->m_downloadedFileHandle; |
| 124 | 127 |
| 125 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support | 128 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support |
| 126 // whatever values may be present in the opaque m_extraData structure. | 129 // whatever values may be present in the opaque m_extraData structure. |
| 127 | 130 |
| 128 return response.release(); | 131 return response.release(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 144 data->m_resourceLoadTiming = m_resourceLoadTiming->deepCopy(); | 147 data->m_resourceLoadTiming = m_resourceLoadTiming->deepCopy(); |
| 145 data->m_securityInfo = CString(m_securityInfo.data(), m_securityInfo.length(
)); | 148 data->m_securityInfo = CString(m_securityInfo.data(), m_securityInfo.length(
)); |
| 146 data->m_httpVersion = m_httpVersion; | 149 data->m_httpVersion = m_httpVersion; |
| 147 data->m_appCacheID = m_appCacheID; | 150 data->m_appCacheID = m_appCacheID; |
| 148 data->m_appCacheManifestURL = m_appCacheManifestURL.copy(); | 151 data->m_appCacheManifestURL = m_appCacheManifestURL.copy(); |
| 149 data->m_isMultipartPayload = m_isMultipartPayload; | 152 data->m_isMultipartPayload = m_isMultipartPayload; |
| 150 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY; | 153 data->m_wasFetchedViaSPDY = m_wasFetchedViaSPDY; |
| 151 data->m_wasNpnNegotiated = m_wasNpnNegotiated; | 154 data->m_wasNpnNegotiated = m_wasNpnNegotiated; |
| 152 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable; | 155 data->m_wasAlternateProtocolAvailable = m_wasAlternateProtocolAvailable; |
| 153 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy; | 156 data->m_wasFetchedViaProxy = m_wasFetchedViaProxy; |
| 157 data->m_wasFetchedViaServiceWorker = m_wasFetchedViaServiceWorker; |
| 154 data->m_responseTime = m_responseTime; | 158 data->m_responseTime = m_responseTime; |
| 155 data->m_remoteIPAddress = m_remoteIPAddress.string().isolatedCopy(); | 159 data->m_remoteIPAddress = m_remoteIPAddress.string().isolatedCopy(); |
| 156 data->m_remotePort = m_remotePort; | 160 data->m_remotePort = m_remotePort; |
| 157 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); | 161 data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); |
| 158 data->m_downloadedFileHandle = m_downloadedFileHandle; | 162 data->m_downloadedFileHandle = m_downloadedFileHandle; |
| 159 | 163 |
| 160 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support | 164 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support |
| 161 // whatever values may be present in the opaque m_extraData structure. | 165 // whatever values may be present in the opaque m_extraData structure. |
| 162 | 166 |
| 163 return data.release(); | 167 return data.release(); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 if (a.httpHeaderFields() != b.httpHeaderFields()) | 524 if (a.httpHeaderFields() != b.httpHeaderFields()) |
| 521 return false; | 525 return false; |
| 522 if (a.resourceLoadTiming() && b.resourceLoadTiming() && *a.resourceLoadTimin
g() == *b.resourceLoadTiming()) | 526 if (a.resourceLoadTiming() && b.resourceLoadTiming() && *a.resourceLoadTimin
g() == *b.resourceLoadTiming()) |
| 523 return true; | 527 return true; |
| 524 if (a.resourceLoadTiming() != b.resourceLoadTiming()) | 528 if (a.resourceLoadTiming() != b.resourceLoadTiming()) |
| 525 return false; | 529 return false; |
| 526 return true; | 530 return true; |
| 527 } | 531 } |
| 528 | 532 |
| 529 } | 533 } |
| OLD | NEW |