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 19 matching lines...) Expand all Loading... | |
30 | 30 |
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/modules/serviceworker/WebServiceWorkerResponseType.h" | 38 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" |
39 | 39 |
40 #include <vector> | |
estark
2016/05/20 22:36:42
should be above the other includes
dwaxweiler
2016/05/21 09:21:37
That yields a presubmit error "check-webkit-style
| |
41 | |
40 namespace blink { | 42 namespace blink { |
41 | 43 |
42 class ResourceResponse; | 44 class ResourceResponse; |
43 class WebHTTPHeaderVisitor; | 45 class WebHTTPHeaderVisitor; |
44 class WebHTTPLoadInfo; | 46 class WebHTTPLoadInfo; |
45 class WebURL; | 47 class WebURL; |
46 class WebURLLoadTiming; | 48 class WebURLLoadTiming; |
47 class WebURLResponsePrivate; | 49 class WebURLResponsePrivate; |
48 | 50 |
49 class WebURLResponse { | 51 class WebURLResponse { |
50 public: | 52 public: |
51 enum HTTPVersion { HTTPVersionUnknown, | 53 enum HTTPVersion { HTTPVersionUnknown, |
52 HTTPVersion_0_9, | 54 HTTPVersion_0_9, |
53 HTTPVersion_1_0, | 55 HTTPVersion_1_0, |
54 HTTPVersion_1_1, | 56 HTTPVersion_1_1, |
55 HTTPVersion_2_0 }; | 57 HTTPVersion_2_0 }; |
56 enum SecurityStyle { | 58 enum SecurityStyle { |
57 SecurityStyleUnknown, | 59 SecurityStyleUnknown, |
58 SecurityStyleUnauthenticated, | 60 SecurityStyleUnauthenticated, |
59 SecurityStyleAuthenticationBroken, | 61 SecurityStyleAuthenticationBroken, |
60 SecurityStyleWarning, | 62 SecurityStyleWarning, |
61 SecurityStyleAuthenticated | 63 SecurityStyleAuthenticated |
62 }; | 64 }; |
63 | 65 |
66 struct SignedCertificateTimestamp { | |
67 SignedCertificateTimestamp( | |
68 WebString status, | |
69 WebString origin, | |
70 WebString version, | |
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 , version(version) | |
80 , logDescription(logDescription) | |
81 , logId(logId) | |
82 , timestamp(timestamp) | |
83 , hashAlgorithm(hashAlgorithm) | |
84 , signatureAlgorithm(signatureAlgorithm) | |
85 , signatureData(signatureData) | |
86 { | |
87 } | |
88 WebString status; | |
89 WebString origin; | |
90 WebString version; | |
91 WebString logDescription; | |
92 WebString logId; | |
93 int64_t timestamp; | |
94 WebString hashAlgorithm; | |
95 WebString signatureAlgorithm; | |
96 WebString signatureData; | |
97 }; | |
98 | |
99 using SignedCertificateTimestampList = std::vector<SignedCertificateTimestam p>; | |
100 | |
64 struct WebSecurityDetails { | 101 struct WebSecurityDetails { |
65 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) | 102 WebSecurityDetails(const WebString& protocol, |
103 const WebString& keyExchange, | |
104 const WebString& cipher, | |
105 const WebString& mac, | |
106 int certId, | |
107 size_t numUnknownScts, | |
108 size_t numInvalidScts, | |
109 size_t numValidScts, | |
110 const SignedCertificateTimestampList& sctList) | |
66 : protocol(protocol) | 111 : protocol(protocol) |
67 , keyExchange(keyExchange) | 112 , keyExchange(keyExchange) |
68 , cipher(cipher) | 113 , cipher(cipher) |
69 , mac(mac) | 114 , mac(mac) |
70 , certId(certId) | 115 , certId(certId) |
71 , numUnknownScts(numUnknownScts) | 116 , numUnknownScts(numUnknownScts) |
72 , numInvalidScts(numInvalidScts) | 117 , numInvalidScts(numInvalidScts) |
73 , numValidScts(numValidScts) | 118 , numValidScts(numValidScts) |
119 , sctList(sctList) | |
74 { | 120 { |
75 } | 121 } |
76 // All strings are human-readable values. | 122 // All strings are human-readable values. |
77 WebString protocol; | 123 WebString protocol; |
78 WebString keyExchange; | 124 WebString keyExchange; |
79 WebString cipher; | 125 WebString cipher; |
80 // mac is the empty string when the connection cipher suite does not | 126 // mac is the empty string when the connection cipher suite does not |
81 // have a separate MAC value (i.e. if the cipher suite is AEAD). | 127 // have a separate MAC value (i.e. if the cipher suite is AEAD). |
82 WebString mac; | 128 WebString mac; |
83 int certId; | 129 int certId; |
84 size_t numUnknownScts; | 130 size_t numUnknownScts; |
85 size_t numInvalidScts; | 131 size_t numInvalidScts; |
86 size_t numValidScts; | 132 size_t numValidScts; |
133 SignedCertificateTimestampList sctList; | |
87 }; | 134 }; |
88 | 135 |
89 class ExtraData { | 136 class ExtraData { |
90 public: | 137 public: |
91 virtual ~ExtraData() { } | 138 virtual ~ExtraData() { } |
92 }; | 139 }; |
93 | 140 |
94 ~WebURLResponse() { reset(); } | 141 ~WebURLResponse() { reset(); } |
95 | 142 |
96 WebURLResponse() : m_private(0) { } | 143 WebURLResponse() : m_private(0) { } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 protected: | 305 protected: |
259 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); | 306 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); |
260 | 307 |
261 private: | 308 private: |
262 WebURLResponsePrivate* m_private; | 309 WebURLResponsePrivate* m_private; |
263 }; | 310 }; |
264 | 311 |
265 } // namespace blink | 312 } // namespace blink |
266 | 313 |
267 #endif | 314 #endif |
OLD | NEW |