| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 String m_hashAlgorithm; | 94 String m_hashAlgorithm; |
| 95 String m_signatureAlgorithm; | 95 String m_signatureAlgorithm; |
| 96 String m_signatureData; | 96 String m_signatureData; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 using SignedCertificateTimestampList = WTF::Vector<SignedCertificateTimestam
p>; | 99 using SignedCertificateTimestampList = WTF::Vector<SignedCertificateTimestam
p>; |
| 100 | 100 |
| 101 struct SecurityDetails { | 101 struct SecurityDetails { |
| 102 DISALLOW_NEW(); | 102 DISALLOW_NEW(); |
| 103 SecurityDetails() | 103 SecurityDetails() |
| 104 : certID(0) | 104 : validFrom(0) |
| 105 , validTo(0) |
| 105 { | 106 { |
| 106 } | 107 } |
| 107 // All strings are human-readable values. | 108 // All strings are human-readable values. |
| 108 String protocol; | 109 String protocol; |
| 109 String keyExchange; | 110 String keyExchange; |
| 110 String cipher; | 111 String cipher; |
| 111 // mac is the empty string when the connection cipher suite does not | 112 // mac is the empty string when the connection cipher suite does not |
| 112 // have a separate MAC value (i.e. if the cipher suite is AEAD). | 113 // have a separate MAC value (i.e. if the cipher suite is AEAD). |
| 113 String mac; | 114 String mac; |
| 114 int certID; | 115 String subjectName; |
| 116 Vector<String> sanList; |
| 117 String issuer; |
| 118 time_t validFrom; |
| 119 time_t validTo; |
| 120 // DER-encoded X509Certificate certificate chain. |
| 121 Vector<AtomicString> certificate; |
| 115 SignedCertificateTimestampList sctList; | 122 SignedCertificateTimestampList sctList; |
| 116 }; | 123 }; |
| 117 | 124 |
| 118 class ExtraData : public RefCounted<ExtraData> { | 125 class ExtraData : public RefCounted<ExtraData> { |
| 119 public: | 126 public: |
| 120 virtual ~ExtraData() { } | 127 virtual ~ExtraData() { } |
| 121 }; | 128 }; |
| 122 | 129 |
| 123 explicit ResourceResponse(CrossThreadResourceResponseData*); | 130 explicit ResourceResponse(CrossThreadResourceResponseData*); |
| 124 | 131 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 const CString& getSecurityInfo() const { return m_securityInfo; } | 212 const CString& getSecurityInfo() const { return m_securityInfo; } |
| 206 void setSecurityInfo(const CString& securityInfo) { m_securityInfo = securit
yInfo; } | 213 void setSecurityInfo(const CString& securityInfo) { m_securityInfo = securit
yInfo; } |
| 207 | 214 |
| 208 bool hasMajorCertificateErrors() const { return m_hasMajorCertificateErrors;
} | 215 bool hasMajorCertificateErrors() const { return m_hasMajorCertificateErrors;
} |
| 209 void setHasMajorCertificateErrors(bool hasMajorCertificateErrors) { m_hasMaj
orCertificateErrors = hasMajorCertificateErrors; } | 216 void setHasMajorCertificateErrors(bool hasMajorCertificateErrors) { m_hasMaj
orCertificateErrors = hasMajorCertificateErrors; } |
| 210 | 217 |
| 211 SecurityStyle getSecurityStyle() const { return m_securityStyle; } | 218 SecurityStyle getSecurityStyle() const { return m_securityStyle; } |
| 212 void setSecurityStyle(SecurityStyle securityStyle) { m_securityStyle = secur
ityStyle; } | 219 void setSecurityStyle(SecurityStyle securityStyle) { m_securityStyle = secur
ityStyle; } |
| 213 | 220 |
| 214 const SecurityDetails* getSecurityDetails() const { return &m_securityDetail
s; } | 221 const SecurityDetails* getSecurityDetails() const { return &m_securityDetail
s; } |
| 215 void setSecurityDetails(const String& protocol, const String& keyExchange, c
onst String& cipher, const String& mac, int certId, const SignedCertificateTimes
tampList& sctList); | 222 void setSecurityDetails(const String& protocol, const String& keyExchange, c
onst String& cipher, const String& mac, const String& subjectName, const Vector<
String>& sanList, const String& issuer, time_t validFrom, time_t validTo, const
Vector<AtomicString>& certificate, const SignedCertificateTimestampList& sctList
); |
| 216 | 223 |
| 217 long long appCacheID() const { return m_appCacheID; } | 224 long long appCacheID() const { return m_appCacheID; } |
| 218 void setAppCacheID(long long id) { m_appCacheID = id; } | 225 void setAppCacheID(long long id) { m_appCacheID = id; } |
| 219 | 226 |
| 220 const KURL& appCacheManifestURL() const { return m_appCacheManifestURL; } | 227 const KURL& appCacheManifestURL() const { return m_appCacheManifestURL; } |
| 221 void setAppCacheManifestURL(const KURL& url) { m_appCacheManifestURL = url;
} | 228 void setAppCacheManifestURL(const KURL& url) { m_appCacheManifestURL = url;
} |
| 222 | 229 |
| 223 bool wasFetchedViaSPDY() const { return m_wasFetchedViaSPDY; } | 230 bool wasFetchedViaSPDY() const { return m_wasFetchedViaSPDY; } |
| 224 void setWasFetchedViaSPDY(bool value) { m_wasFetchedViaSPDY = value; } | 231 void setWasFetchedViaSPDY(bool value) { m_wasFetchedViaSPDY = value; } |
| 225 | 232 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 String m_suggestedFilename; | 451 String m_suggestedFilename; |
| 445 int m_httpStatusCode; | 452 int m_httpStatusCode; |
| 446 String m_httpStatusText; | 453 String m_httpStatusText; |
| 447 std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders; | 454 std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders; |
| 448 time_t m_lastModifiedDate; | 455 time_t m_lastModifiedDate; |
| 449 RefPtr<ResourceLoadTiming> m_resourceLoadTiming; | 456 RefPtr<ResourceLoadTiming> m_resourceLoadTiming; |
| 450 CString m_securityInfo; | 457 CString m_securityInfo; |
| 451 bool m_hasMajorCertificateErrors; | 458 bool m_hasMajorCertificateErrors; |
| 452 ResourceResponse::SecurityStyle m_securityStyle; | 459 ResourceResponse::SecurityStyle m_securityStyle; |
| 453 ResourceResponse::SecurityDetails m_securityDetails; | 460 ResourceResponse::SecurityDetails m_securityDetails; |
| 461 // This is |certificate| from SecurityDetails since that structure should |
| 462 // use an AtomicString but this temporary structure is sent across threads. |
| 463 Vector<String> m_certificate; |
| 454 ResourceResponse::HTTPVersion m_httpVersion; | 464 ResourceResponse::HTTPVersion m_httpVersion; |
| 455 long long m_appCacheID; | 465 long long m_appCacheID; |
| 456 KURL m_appCacheManifestURL; | 466 KURL m_appCacheManifestURL; |
| 457 Vector<char> m_multipartBoundary; | 467 Vector<char> m_multipartBoundary; |
| 458 bool m_wasFetchedViaSPDY; | 468 bool m_wasFetchedViaSPDY; |
| 459 bool m_wasNpnNegotiated; | 469 bool m_wasNpnNegotiated; |
| 460 bool m_wasAlternateProtocolAvailable; | 470 bool m_wasAlternateProtocolAvailable; |
| 461 bool m_wasFetchedViaProxy; | 471 bool m_wasFetchedViaProxy; |
| 462 bool m_wasFetchedViaServiceWorker; | 472 bool m_wasFetchedViaServiceWorker; |
| 463 bool m_wasFetchedViaForeignFetch; | 473 bool m_wasFetchedViaForeignFetch; |
| 464 bool m_wasFallbackRequiredByServiceWorker; | 474 bool m_wasFallbackRequiredByServiceWorker; |
| 465 WebServiceWorkerResponseType m_serviceWorkerResponseType; | 475 WebServiceWorkerResponseType m_serviceWorkerResponseType; |
| 466 KURL m_originalURLViaServiceWorker; | 476 KURL m_originalURLViaServiceWorker; |
| 467 String m_cacheStorageCacheName; | 477 String m_cacheStorageCacheName; |
| 468 int64_t m_responseTime; | 478 int64_t m_responseTime; |
| 469 String m_remoteIPAddress; | 479 String m_remoteIPAddress; |
| 470 unsigned short m_remotePort; | 480 unsigned short m_remotePort; |
| 471 long long m_encodedBodyLength; | 481 long long m_encodedBodyLength; |
| 472 long long m_decodedBodyLength; | 482 long long m_decodedBodyLength; |
| 473 String m_downloadedFilePath; | 483 String m_downloadedFilePath; |
| 474 RefPtr<BlobDataHandle> m_downloadedFileHandle; | 484 RefPtr<BlobDataHandle> m_downloadedFileHandle; |
| 475 }; | 485 }; |
| 476 | 486 |
| 477 } // namespace blink | 487 } // namespace blink |
| 478 | 488 |
| 479 #endif // ResourceResponse_h | 489 #endif // ResourceResponse_h |
| OLD | NEW |