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