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

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

Issue 1772603002: Addition of Certificate Transparency details to Security panel of DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed some unnecessary includes and fixed order in net.gypi Created 4 years, 8 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 19 matching lines...) Expand all
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>
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 =
100 std::vector<SignedCertificateTimestamp>;
101
64 struct WebSecurityDetails { 102 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) 103 WebSecurityDetails(const WebString& protocol,
104 const WebString& keyExchange,
105 const WebString& cipher,
106 const WebString& mac,
107 int certId,
108 size_t numUnknownScts,
109 size_t numInvalidScts,
110 size_t numValidScts,
111 const SignedCertificateTimestampList& sctList)
66 : protocol(protocol) 112 : protocol(protocol)
67 , keyExchange(keyExchange) 113 , keyExchange(keyExchange)
68 , cipher(cipher) 114 , cipher(cipher)
69 , mac(mac) 115 , mac(mac)
70 , certId(certId) 116 , certId(certId)
71 , numUnknownScts(numUnknownScts) 117 , numUnknownScts(numUnknownScts)
72 , numInvalidScts(numInvalidScts) 118 , numInvalidScts(numInvalidScts)
73 , numValidScts(numValidScts) 119 , numValidScts(numValidScts)
120 , sctList(sctList)
74 { 121 {
75 } 122 }
76 // All strings are human-readable values. 123 // All strings are human-readable values.
77 WebString protocol; 124 WebString protocol;
78 WebString keyExchange; 125 WebString keyExchange;
79 WebString cipher; 126 WebString cipher;
80 // mac is the empty string when the connection cipher suite does not 127 // 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). 128 // have a separate MAC value (i.e. if the cipher suite is AEAD).
82 WebString mac; 129 WebString mac;
83 int certId; 130 int certId;
84 size_t numUnknownScts; 131 size_t numUnknownScts;
85 size_t numInvalidScts; 132 size_t numInvalidScts;
86 size_t numValidScts; 133 size_t numValidScts;
134 SignedCertificateTimestampList sctList;
87 }; 135 };
88 136
89 class ExtraData { 137 class ExtraData {
90 public: 138 public:
91 virtual ~ExtraData() { } 139 virtual ~ExtraData() { }
92 }; 140 };
93 141
94 ~WebURLResponse() { reset(); } 142 ~WebURLResponse() { reset(); }
95 143
96 WebURLResponse() : m_private(0) { } 144 WebURLResponse() : m_private(0) { }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 protected: 306 protected:
259 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); 307 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*);
260 308
261 private: 309 private:
262 WebURLResponsePrivate* m_private; 310 WebURLResponsePrivate* m_private;
263 }; 311 };
264 312
265 } // namespace blink 313 } // namespace blink
266 314
267 #endif 315 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698