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 20 matching lines...) Expand all Loading... |
31 #ifndef WebURLResponse_h | 31 #ifndef WebURLResponse_h |
32 #define WebURLResponse_h | 32 #define WebURLResponse_h |
33 | 33 |
34 #include "public/platform/WebCString.h" | 34 #include "public/platform/WebCString.h" |
35 #include "public/platform/WebCommon.h" | 35 #include "public/platform/WebCommon.h" |
36 #include "public/platform/WebPrivateOwnPtr.h" | 36 #include "public/platform/WebPrivateOwnPtr.h" |
37 #include "public/platform/WebString.h" | 37 #include "public/platform/WebString.h" |
38 #include "public/platform/WebVector.h" | 38 #include "public/platform/WebVector.h" |
39 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" |
40 | 40 |
| 41 #include <vector> |
| 42 |
41 namespace blink { | 43 namespace blink { |
42 | 44 |
43 class ResourceResponse; | 45 class ResourceResponse; |
44 class WebHTTPHeaderVisitor; | 46 class WebHTTPHeaderVisitor; |
45 class WebHTTPLoadInfo; | 47 class WebHTTPLoadInfo; |
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 logDescription, |
| 72 WebString logId, |
| 73 int64_t timestamp, |
| 74 WebString hashAlgorithm, |
| 75 WebString signatureAlgorithm, |
| 76 WebString signatureData) |
| 77 : status(status) |
| 78 , origin(origin) |
| 79 , logDescription(logDescription) |
| 80 , logId(logId) |
| 81 , timestamp(timestamp) |
| 82 , hashAlgorithm(hashAlgorithm) |
| 83 , signatureAlgorithm(signatureAlgorithm) |
| 84 , signatureData(signatureData) |
| 85 { |
| 86 } |
| 87 WebString status; |
| 88 WebString origin; |
| 89 WebString logDescription; |
| 90 WebString logId; |
| 91 int64_t timestamp; |
| 92 WebString hashAlgorithm; |
| 93 WebString signatureAlgorithm; |
| 94 WebString signatureData; |
| 95 }; |
| 96 |
| 97 using SignedCertificateTimestampList = std::vector<SignedCertificateTimestam
p>; |
| 98 |
65 struct WebSecurityDetails { | 99 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) | 100 WebSecurityDetails(const WebString& protocol, |
| 101 const WebString& keyExchange, |
| 102 const WebString& cipher, |
| 103 const WebString& mac, |
| 104 int certId, |
| 105 size_t numUnknownScts, |
| 106 size_t numInvalidScts, |
| 107 size_t numValidScts, |
| 108 const SignedCertificateTimestampList& sctList) |
67 : protocol(protocol) | 109 : protocol(protocol) |
68 , keyExchange(keyExchange) | 110 , keyExchange(keyExchange) |
69 , cipher(cipher) | 111 , cipher(cipher) |
70 , mac(mac) | 112 , mac(mac) |
71 , certId(certId) | 113 , certId(certId) |
72 , numUnknownScts(numUnknownScts) | 114 , numUnknownScts(numUnknownScts) |
73 , numInvalidScts(numInvalidScts) | 115 , numInvalidScts(numInvalidScts) |
74 , numValidScts(numValidScts) | 116 , numValidScts(numValidScts) |
| 117 , sctList(sctList) |
75 { | 118 { |
76 } | 119 } |
77 // All strings are human-readable values. | 120 // All strings are human-readable values. |
78 WebString protocol; | 121 WebString protocol; |
79 WebString keyExchange; | 122 WebString keyExchange; |
80 WebString cipher; | 123 WebString cipher; |
81 // mac is the empty string when the connection cipher suite does not | 124 // 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). | 125 // have a separate MAC value (i.e. if the cipher suite is AEAD). |
83 WebString mac; | 126 WebString mac; |
84 int certId; | 127 int certId; |
85 size_t numUnknownScts; | 128 size_t numUnknownScts; |
86 size_t numInvalidScts; | 129 size_t numInvalidScts; |
87 size_t numValidScts; | 130 size_t numValidScts; |
| 131 SignedCertificateTimestampList sctList; |
88 }; | 132 }; |
89 | 133 |
90 class ExtraData { | 134 class ExtraData { |
91 public: | 135 public: |
92 virtual ~ExtraData() { } | 136 virtual ~ExtraData() { } |
93 }; | 137 }; |
94 | 138 |
95 ~WebURLResponse() { reset(); } | 139 ~WebURLResponse() { reset(); } |
96 | 140 |
97 WebURLResponse() : m_private(0) { } | 141 WebURLResponse() : m_private(0) { } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 protected: | 308 protected: |
265 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); | 309 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); |
266 | 310 |
267 private: | 311 private: |
268 WebURLResponsePrivate* m_private; | 312 WebURLResponsePrivate* m_private; |
269 }; | 313 }; |
270 | 314 |
271 } // namespace blink | 315 } // namespace blink |
272 | 316 |
273 #endif | 317 #endif |
OLD | NEW |