Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/public/platform/WebURLResponse.h

Issue 1589703002: Surface SCT (Signed Certificate Timestamp) counts in the Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address latest comments. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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/modules/serviceworker/WebServiceWorkerResponseType.h" 37 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 class ResourceResponse; 41 class ResourceResponse;
41 class WebCString; 42 class WebCString;
42 class WebHTTPHeaderVisitor; 43 class WebHTTPHeaderVisitor;
43 class WebHTTPLoadInfo; 44 class WebHTTPLoadInfo;
44 class WebString; 45 class WebString;
45 class WebURL; 46 class WebURL;
46 class WebURLLoadTiming; 47 class WebURLLoadTiming;
47 class WebURLResponsePrivate; 48 class WebURLResponsePrivate;
48 49
49 class WebURLResponse { 50 class WebURLResponse {
50 public: 51 public:
51 enum HTTPVersion { HTTPVersionUnknown, 52 enum HTTPVersion { HTTPVersionUnknown,
52 HTTPVersion_0_9, 53 HTTPVersion_0_9,
53 HTTPVersion_1_0, 54 HTTPVersion_1_0,
54 HTTPVersion_1_1, 55 HTTPVersion_1_1,
55 HTTPVersion_2_0 }; 56 HTTPVersion_2_0 };
56 enum SecurityStyle { 57 enum SecurityStyle {
57 SecurityStyleUnknown, 58 SecurityStyleUnknown,
58 SecurityStyleUnauthenticated, 59 SecurityStyleUnauthenticated,
59 SecurityStyleAuthenticationBroken, 60 SecurityStyleAuthenticationBroken,
60 SecurityStyleWarning, 61 SecurityStyleWarning,
61 SecurityStyleAuthenticated 62 SecurityStyleAuthenticated
62 }; 63 };
63 64
65 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)
67 : protocol(protocol)
68 , keyExchange(keyExchange)
69 , cipher(cipher)
70 , mac(mac)
71 , certId(certId)
72 , numUnknownScts(numUnknownScts)
73 , numInvalidScts(numInvalidScts)
74 , numValidScts(numValidScts)
75 {
76 }
77 // All strings are human-readable values.
78 WebString protocol;
79 WebString keyExchange;
80 WebString cipher;
81 // 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).
83 WebString mac;
84 int certId;
85 size_t numUnknownScts;
86 size_t numInvalidScts;
87 size_t numValidScts;
88 };
89
64 class ExtraData { 90 class ExtraData {
65 public: 91 public:
66 virtual ~ExtraData() { } 92 virtual ~ExtraData() { }
67 }; 93 };
68 94
69 ~WebURLResponse() { reset(); } 95 ~WebURLResponse() { reset(); }
70 96
71 WebURLResponse() : m_private(0) { } 97 WebURLResponse() : m_private(0) { }
72 WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); } 98 WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); }
73 WebURLResponse& operator=(const WebURLResponse& r) 99 WebURLResponse& operator=(const WebURLResponse& r)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // A consumer controlled value intended to be used to record opaque 170 // A consumer controlled value intended to be used to record opaque
145 // security info related to this request. 171 // security info related to this request.
146 BLINK_PLATFORM_EXPORT WebCString securityInfo() const; 172 BLINK_PLATFORM_EXPORT WebCString securityInfo() const;
147 BLINK_PLATFORM_EXPORT void setSecurityInfo(const WebCString&); 173 BLINK_PLATFORM_EXPORT void setSecurityInfo(const WebCString&);
148 174
149 BLINK_PLATFORM_EXPORT void setHasMajorCertificateErrors(bool); 175 BLINK_PLATFORM_EXPORT void setHasMajorCertificateErrors(bool);
150 176
151 BLINK_PLATFORM_EXPORT SecurityStyle securityStyle() const; 177 BLINK_PLATFORM_EXPORT SecurityStyle securityStyle() const;
152 BLINK_PLATFORM_EXPORT void setSecurityStyle(SecurityStyle); 178 BLINK_PLATFORM_EXPORT void setSecurityStyle(SecurityStyle);
153 179
154 BLINK_PLATFORM_EXPORT void setSecurityDetails(const WebString& protocol, con st WebString& keyExchange, const WebString& cipher, const WebString& mac, int ce rtId); 180 BLINK_PLATFORM_EXPORT void setSecurityDetails(const WebSecurityDetails&);
155 181
156 #if INSIDE_BLINK 182 #if INSIDE_BLINK
157 BLINK_PLATFORM_EXPORT ResourceResponse& toMutableResourceResponse(); 183 BLINK_PLATFORM_EXPORT ResourceResponse& toMutableResourceResponse();
158 BLINK_PLATFORM_EXPORT const ResourceResponse& toResourceResponse() const; 184 BLINK_PLATFORM_EXPORT const ResourceResponse& toResourceResponse() const;
159 #endif 185 #endif
160 186
161 // Flag whether this request was served from the disk cache entry. 187 // Flag whether this request was served from the disk cache entry.
162 BLINK_PLATFORM_EXPORT bool wasCached() const; 188 BLINK_PLATFORM_EXPORT bool wasCached() const;
163 BLINK_PLATFORM_EXPORT void setWasCached(bool); 189 BLINK_PLATFORM_EXPORT void setWasCached(bool);
164 190
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 protected: 255 protected:
230 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); 256 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*);
231 257
232 private: 258 private:
233 WebURLResponsePrivate* m_private; 259 WebURLResponsePrivate* m_private;
234 }; 260 };
235 261
236 } // namespace blink 262 } // namespace blink
237 263
238 #endif 264 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698