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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceResponse.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 SignedCertificateTimestampStore and SignedCertificateTimestampIDStatus(List) Created 4 years, 9 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 16 matching lines...) Expand all
27 #ifndef ResourceResponse_h 27 #ifndef ResourceResponse_h
28 #define ResourceResponse_h 28 #define ResourceResponse_h
29 29
30 #include "platform/PlatformExport.h" 30 #include "platform/PlatformExport.h"
31 #include "platform/blob/BlobData.h" 31 #include "platform/blob/BlobData.h"
32 #include "platform/network/HTTPHeaderMap.h" 32 #include "platform/network/HTTPHeaderMap.h"
33 #include "platform/network/HTTPParsers.h" 33 #include "platform/network/HTTPParsers.h"
34 #include "platform/network/ResourceLoadInfo.h" 34 #include "platform/network/ResourceLoadInfo.h"
35 #include "platform/network/ResourceLoadTiming.h" 35 #include "platform/network/ResourceLoadTiming.h"
36 #include "platform/weborigin/KURL.h" 36 #include "platform/weborigin/KURL.h"
37 #include "public/platform/WebURLResponse.h"
37 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h" 38 #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
38 #include "wtf/PassOwnPtr.h" 39 #include "wtf/PassOwnPtr.h"
39 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
40 #include "wtf/text/CString.h" 41 #include "wtf/text/CString.h"
41 42
43 #include <vector>
44
42 namespace blink { 45 namespace blink {
43 46
44 struct CrossThreadResourceResponseData; 47 struct CrossThreadResourceResponseData;
45 48
46 class PLATFORM_EXPORT ResourceResponse final { 49 class PLATFORM_EXPORT ResourceResponse final {
47 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 50 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
48 public: 51 public:
49 enum HTTPVersion { HTTPVersionUnknown, 52 enum HTTPVersion { HTTPVersionUnknown,
50 HTTPVersion_0_9, 53 HTTPVersion_0_9,
51 HTTPVersion_1_0, 54 HTTPVersion_1_0,
52 HTTPVersion_1_1, 55 HTTPVersion_1_1,
53 HTTPVersion_2_0 }; 56 HTTPVersion_2_0 };
54 enum SecurityStyle { 57 enum SecurityStyle {
55 SecurityStyleUnknown, 58 SecurityStyleUnknown,
56 SecurityStyleUnauthenticated, 59 SecurityStyleUnauthenticated,
57 SecurityStyleAuthenticationBroken, 60 SecurityStyleAuthenticationBroken,
58 SecurityStyleWarning, 61 SecurityStyleWarning,
59 SecurityStyleAuthenticated 62 SecurityStyleAuthenticated
60 }; 63 };
61 64
65 class SignedCertificateTimestamp {
66 public:
67 SignedCertificateTimestamp(
68 String status,
69 String origin,
70 String version,
71 String logDescription,
72 String logId,
73 int64_t timestamp,
74 String hashAlgorithm,
75 String signatureAlgorithm,
76 String 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 SignedCertificateTimestamp(
89 const struct blink::WebURLResponse::SignedCertificateTimestamp&);
90 String status;
91 String origin;
92 String version;
93 String logDescription;
94 String logId;
95 int64_t timestamp;
96 String hashAlgorithm;
97 String signatureAlgorithm;
98 String signatureData;
99 };
100
101 using SignedCertificateTimestampList =
102 std::vector<SignedCertificateTimestamp>;
103
62 struct SecurityDetails { 104 struct SecurityDetails {
63 DISALLOW_NEW(); 105 DISALLOW_NEW();
64 SecurityDetails() 106 SecurityDetails()
65 : certID(0) 107 : certID(0)
66 , numUnknownSCTs(0) 108 , numUnknownSCTs(0)
67 , numInvalidSCTs(0) 109 , numInvalidSCTs(0)
68 , numValidSCTs(0) 110 , numValidSCTs(0)
69 { 111 {
70 } 112 }
71 // All strings are human-readable values. 113 // All strings are human-readable values.
72 String protocol; 114 String protocol;
73 String keyExchange; 115 String keyExchange;
74 String cipher; 116 String cipher;
75 // mac is the empty string when the connection cipher suite does not 117 // mac is the empty string when the connection cipher suite does not
76 // have a separate MAC value (i.e. if the cipher suite is AEAD). 118 // have a separate MAC value (i.e. if the cipher suite is AEAD).
77 String mac; 119 String mac;
78 int certID; 120 int certID;
79 size_t numUnknownSCTs; 121 size_t numUnknownSCTs;
80 size_t numInvalidSCTs; 122 size_t numInvalidSCTs;
81 size_t numValidSCTs; 123 size_t numValidSCTs;
124 SignedCertificateTimestampList sctList;
82 }; 125 };
83 126
84 class ExtraData : public RefCounted<ExtraData> { 127 class ExtraData : public RefCounted<ExtraData> {
85 public: 128 public:
86 virtual ~ExtraData() { } 129 virtual ~ExtraData() { }
87 }; 130 };
88 131
89 explicit ResourceResponse(CrossThreadResourceResponseData*); 132 explicit ResourceResponse(CrossThreadResourceResponseData*);
90 133
91 // Gets a copy of the data suitable for passing to another thread. 134 // Gets a copy of the data suitable for passing to another thread.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const CString& getSecurityInfo() const { return m_securityInfo; } 212 const CString& getSecurityInfo() const { return m_securityInfo; }
170 void setSecurityInfo(const CString& securityInfo) { m_securityInfo = securit yInfo; } 213 void setSecurityInfo(const CString& securityInfo) { m_securityInfo = securit yInfo; }
171 214
172 bool hasMajorCertificateErrors() const { return m_hasMajorCertificateErrors; } 215 bool hasMajorCertificateErrors() const { return m_hasMajorCertificateErrors; }
173 void setHasMajorCertificateErrors(bool hasMajorCertificateErrors) { m_hasMaj orCertificateErrors = hasMajorCertificateErrors; } 216 void setHasMajorCertificateErrors(bool hasMajorCertificateErrors) { m_hasMaj orCertificateErrors = hasMajorCertificateErrors; }
174 217
175 SecurityStyle getSecurityStyle() const { return m_securityStyle; } 218 SecurityStyle getSecurityStyle() const { return m_securityStyle; }
176 void setSecurityStyle(SecurityStyle securityStyle) { m_securityStyle = secur ityStyle; } 219 void setSecurityStyle(SecurityStyle securityStyle) { m_securityStyle = secur ityStyle; }
177 220
178 const SecurityDetails* getSecurityDetails() const { return &m_securityDetail s; } 221 const SecurityDetails* getSecurityDetails() const { return &m_securityDetail s; }
179 void setSecurityDetails(const String& protocol, const String& keyExchange, c onst String& cipher, const String& mac, int certId, size_t numUnknownScts, size_ t numInvalidScts, size_t numValidScts); 222 void setSecurityDetails(const String& protocol, const String& keyExchange, c onst String& cipher, const String& mac, int certId, size_t numUnknownScts, size_ t numInvalidScts, size_t numValidScts, const SignedCertificateTimestampList& sct List);
180 223
181 long long appCacheID() const { return m_appCacheID; } 224 long long appCacheID() const { return m_appCacheID; }
182 void setAppCacheID(long long id) { m_appCacheID = id; } 225 void setAppCacheID(long long id) { m_appCacheID = id; }
183 226
184 const KURL& appCacheManifestURL() const { return m_appCacheManifestURL; } 227 const KURL& appCacheManifestURL() const { return m_appCacheManifestURL; }
185 void setAppCacheManifestURL(const KURL& url) { m_appCacheManifestURL = url; } 228 void setAppCacheManifestURL(const KURL& url) { m_appCacheManifestURL = url; }
186 229
187 bool wasFetchedViaSPDY() const { return m_wasFetchedViaSPDY; } 230 bool wasFetchedViaSPDY() const { return m_wasFetchedViaSPDY; }
188 void setWasFetchedViaSPDY(bool value) { m_wasFetchedViaSPDY = value; } 231 void setWasFetchedViaSPDY(bool value) { m_wasFetchedViaSPDY = value; }
189 232
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 int64_t m_responseTime; 438 int64_t m_responseTime;
396 String m_remoteIPAddress; 439 String m_remoteIPAddress;
397 unsigned short m_remotePort; 440 unsigned short m_remotePort;
398 String m_downloadedFilePath; 441 String m_downloadedFilePath;
399 RefPtr<BlobDataHandle> m_downloadedFileHandle; 442 RefPtr<BlobDataHandle> m_downloadedFileHandle;
400 }; 443 };
401 444
402 } // namespace blink 445 } // namespace blink
403 446
404 #endif // ResourceResponse_h 447 #endif // ResourceResponse_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698