| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebURLResponse_h | 31 #ifndef WebURLResponse_h |
| 32 #define WebURLResponse_h | 32 #define WebURLResponse_h |
| 33 | 33 |
| 34 #include "public/platform/WebCommon.h" | 34 #include "public/platform/WebCommon.h" |
| 35 #include "public/platform/WebPrivateOwnPtr.h" | 35 #include "public/platform/WebPrivateOwnPtr.h" |
| 36 #include "public/platform/WebString.h" | 36 #include "public/platform/WebString.h" |
| 37 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" | 37 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" |
| 38 | 38 |
| 39 #include <vector> |
| 40 |
| 39 namespace blink { | 41 namespace blink { |
| 40 | 42 |
| 41 class ResourceResponse; | 43 class ResourceResponse; |
| 42 class WebCString; | 44 class WebCString; |
| 43 class WebHTTPHeaderVisitor; | 45 class WebHTTPHeaderVisitor; |
| 44 class WebHTTPLoadInfo; | 46 class WebHTTPLoadInfo; |
| 45 class WebString; | 47 class WebString; |
| 46 class WebURL; | 48 class WebURL; |
| 47 class WebURLLoadTiming; | 49 class WebURLLoadTiming; |
| 48 class WebURLResponsePrivate; | 50 class WebURLResponsePrivate; |
| 49 | 51 |
| 50 class WebURLResponse { | 52 class WebURLResponse { |
| 51 public: | 53 public: |
| 52 enum HTTPVersion { HTTPVersionUnknown, | 54 enum HTTPVersion { HTTPVersionUnknown, |
| 53 HTTPVersion_0_9, | 55 HTTPVersion_0_9, |
| 54 HTTPVersion_1_0, | 56 HTTPVersion_1_0, |
| 55 HTTPVersion_1_1, | 57 HTTPVersion_1_1, |
| 56 HTTPVersion_2_0 }; | 58 HTTPVersion_2_0 }; |
| 57 enum SecurityStyle { | 59 enum SecurityStyle { |
| 58 SecurityStyleUnknown, | 60 SecurityStyleUnknown, |
| 59 SecurityStyleUnauthenticated, | 61 SecurityStyleUnauthenticated, |
| 60 SecurityStyleAuthenticationBroken, | 62 SecurityStyleAuthenticationBroken, |
| 61 SecurityStyleWarning, | 63 SecurityStyleWarning, |
| 62 SecurityStyleAuthenticated | 64 SecurityStyleAuthenticated |
| 63 }; | 65 }; |
| 64 | 66 |
| 67 struct SignedCertificateTimestamp { |
| 68 SignedCertificateTimestamp( |
| 69 WebString status, |
| 70 WebString origin, |
| 71 WebString version, |
| 72 WebString logDescription, |
| 73 WebString logId, |
| 74 int64_t timestamp, |
| 75 WebString hashAlgorithm, |
| 76 WebString signatureAlgorithm, |
| 77 WebString signatureData) |
| 78 : status(status) |
| 79 , origin(origin) |
| 80 , version(version) |
| 81 , logDescription(logDescription) |
| 82 , logId(logId) |
| 83 , timestamp(timestamp) |
| 84 , hashAlgorithm(hashAlgorithm) |
| 85 , signatureAlgorithm(signatureAlgorithm) |
| 86 , signatureData(signatureData) |
| 87 { |
| 88 } |
| 89 WebString status; |
| 90 WebString origin; |
| 91 WebString version; |
| 92 WebString logDescription; |
| 93 WebString logId; |
| 94 int64_t timestamp; |
| 95 WebString hashAlgorithm; |
| 96 WebString signatureAlgorithm; |
| 97 WebString signatureData; |
| 98 }; |
| 99 |
| 100 using SignedCertificateTimestampList = |
| 101 std::vector<SignedCertificateTimestamp>; |
| 102 |
| 65 struct WebSecurityDetails { | 103 struct WebSecurityDetails { |
| 66 WebSecurityDetails(const WebString& protocol, const WebString& keyExchan
ge, const WebString& cipher, const WebString& mac, int certId, size_t numUnknown
Scts, size_t numInvalidScts, size_t numValidScts) | 104 WebSecurityDetails(const WebString& protocol, |
| 105 const WebString& keyExchange, |
| 106 const WebString& cipher, |
| 107 const WebString& mac, |
| 108 int certId, |
| 109 size_t numUnknownScts, |
| 110 size_t numInvalidScts, |
| 111 size_t numValidScts, |
| 112 const SignedCertificateTimestampList& sctList) |
| 67 : protocol(protocol) | 113 : protocol(protocol) |
| 68 , keyExchange(keyExchange) | 114 , keyExchange(keyExchange) |
| 69 , cipher(cipher) | 115 , cipher(cipher) |
| 70 , mac(mac) | 116 , mac(mac) |
| 71 , certId(certId) | 117 , certId(certId) |
| 72 , numUnknownScts(numUnknownScts) | 118 , numUnknownScts(numUnknownScts) |
| 73 , numInvalidScts(numInvalidScts) | 119 , numInvalidScts(numInvalidScts) |
| 74 , numValidScts(numValidScts) | 120 , numValidScts(numValidScts) |
| 121 , sctList(sctList) |
| 75 { | 122 { |
| 76 } | 123 } |
| 77 // All strings are human-readable values. | 124 // All strings are human-readable values. |
| 78 WebString protocol; | 125 WebString protocol; |
| 79 WebString keyExchange; | 126 WebString keyExchange; |
| 80 WebString cipher; | 127 WebString cipher; |
| 81 // mac is the empty string when the connection cipher suite does not | 128 // mac is the empty string when the connection cipher suite does not |
| 82 // have a separate MAC value (i.e. if the cipher suite is AEAD). | 129 // have a separate MAC value (i.e. if the cipher suite is AEAD). |
| 83 WebString mac; | 130 WebString mac; |
| 84 int certId; | 131 int certId; |
| 85 size_t numUnknownScts; | 132 size_t numUnknownScts; |
| 86 size_t numInvalidScts; | 133 size_t numInvalidScts; |
| 87 size_t numValidScts; | 134 size_t numValidScts; |
| 135 SignedCertificateTimestampList sctList; |
| 88 }; | 136 }; |
| 89 | 137 |
| 90 class ExtraData { | 138 class ExtraData { |
| 91 public: | 139 public: |
| 92 virtual ~ExtraData() { } | 140 virtual ~ExtraData() { } |
| 93 }; | 141 }; |
| 94 | 142 |
| 95 ~WebURLResponse() { reset(); } | 143 ~WebURLResponse() { reset(); } |
| 96 | 144 |
| 97 WebURLResponse() : m_private(0) { } | 145 WebURLResponse() : m_private(0) { } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 protected: | 303 protected: |
| 256 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); | 304 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); |
| 257 | 305 |
| 258 private: | 306 private: |
| 259 WebURLResponsePrivate* m_private; | 307 WebURLResponsePrivate* m_private; |
| 260 }; | 308 }; |
| 261 | 309 |
| 262 } // namespace blink | 310 } // namespace blink |
| 263 | 311 |
| 264 #endif | 312 #endif |
| OLD | NEW |