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

Side by Side Diff: components/security_state/security_state_model.h

Issue 2226523002: Add separate plumbing for subresources with certificate errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 4 years, 4 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ 5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_
6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/cert/cert_status_flags.h" 9 #include "net/cert/cert_status_flags.h"
10 #include "net/cert/sct_status_flags.h" 10 #include "net/cert/sct_status_flags.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 enum MixedContentStatus { 75 enum MixedContentStatus {
76 NO_MIXED_CONTENT, 76 NO_MIXED_CONTENT,
77 // The site displayed insecure resources (passive mixed content). 77 // The site displayed insecure resources (passive mixed content).
78 DISPLAYED_MIXED_CONTENT, 78 DISPLAYED_MIXED_CONTENT,
79 // The site ran insecure code (active mixed content). 79 // The site ran insecure code (active mixed content).
80 RAN_MIXED_CONTENT, 80 RAN_MIXED_CONTENT,
81 // The site both ran and displayed insecure resources. 81 // The site both ran and displayed insecure resources.
82 RAN_AND_DISPLAYED_MIXED_CONTENT, 82 RAN_AND_DISPLAYED_MIXED_CONTENT,
83 }; 83 };
84 84
85 // Describes the type of content with certificate errors (if any) that a site
86 // displayed/ran.
87 enum ContentWithCertErrorsStatus {
88 NO_CONTENT_WITH_CERTIFICATE_ERRORS,
89 // The site displayed resources with certificate errors.
90 DISPLAYED_CONTENT_WITH_CERTIFICATE_ERRORS,
91 // The site ran code loaded with certificate errors.
92 RAN_CONTENT_WITH_CERTIFICATE_ERRORS,
93 // The site both ran and displayed content with certificate errors.
94 RAN_AND_DISPLAYED_CONTENT_WITH_CERTIFICATE_ERRORS,
95 };
96
85 // Describes the security status of a page or request. This is the 97 // Describes the security status of a page or request. This is the
86 // main data structure provided by this class. 98 // main data structure provided by this class.
87 struct SecurityInfo { 99 struct SecurityInfo {
88 SecurityInfo(); 100 SecurityInfo();
89 ~SecurityInfo(); 101 ~SecurityInfo();
90 SecurityLevel security_level; 102 SecurityLevel security_level;
91 SHA1DeprecationStatus sha1_deprecation_status; 103 SHA1DeprecationStatus sha1_deprecation_status;
92 MixedContentStatus mixed_content_status; 104 MixedContentStatus mixed_content_status;
105 ContentWithCertErrorsStatus content_with_cert_errors_status;
93 // The verification statuses of the signed certificate timestamps 106 // The verification statuses of the signed certificate timestamps
94 // for the connection. 107 // for the connection.
95 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; 108 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses;
96 bool scheme_is_cryptographic; 109 bool scheme_is_cryptographic;
97 net::CertStatus cert_status; 110 net::CertStatus cert_status;
98 int cert_id; 111 int cert_id;
99 // The security strength, in bits, of the SSL cipher suite. In late 112 // The security strength, in bits, of the SSL cipher suite. In late
100 // 2015, 128 is considered the minimum. 113 // 2015, 128 is considered the minimum.
101 // 0 means the connection is not encrypted. 114 // 0 means the connection is not encrypted.
102 // -1 means the security strength is unknown. 115 // -1 means the security strength is unknown.
(...skipping 29 matching lines...) Expand all
132 int security_bits; 145 int security_bits;
133 // The verification statuses of the Signed Certificate 146 // The verification statuses of the Signed Certificate
134 // Timestamps (if any) that the server provided. 147 // Timestamps (if any) that the server provided.
135 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; 148 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses;
136 // True if the page displayed passive mixed content. 149 // True if the page displayed passive mixed content.
137 bool displayed_mixed_content; 150 bool displayed_mixed_content;
138 // True if the page ran active mixed content. 151 // True if the page ran active mixed content.
139 bool ran_mixed_content; 152 bool ran_mixed_content;
140 // True if PKP was bypassed due to a local trust anchor. 153 // True if PKP was bypassed due to a local trust anchor.
141 bool pkp_bypassed; 154 bool pkp_bypassed;
155 // True if the page displayed content with certificate errors.
156 bool displayed_content_with_certificate_errors;
157 // True if the page ran content with certificate errors.
158 bool ran_content_with_certificate_errors;
142 }; 159 };
143 160
144 // These security levels describe the treatment given to pages that 161 // These security levels describe the treatment given to pages that
145 // display and run mixed content. They are used to coordinate the 162 // display and run mixed content. They are used to coordinate the
146 // treatment of mixed content with other security UI elements. 163 // treatment of mixed content with other security UI elements.
147 static const SecurityLevel kDisplayedInsecureContentLevel; 164 static const SecurityLevel kDisplayedInsecureContentLevel;
148 static const SecurityLevel kRanInsecureContentLevel; 165 static const SecurityLevel kRanInsecureContentLevel;
149 166
150 SecurityStateModel(); 167 SecurityStateModel();
151 virtual ~SecurityStateModel(); 168 virtual ~SecurityStateModel();
(...skipping 13 matching lines...) Expand all
165 mutable VisibleSecurityState visible_security_state_; 182 mutable VisibleSecurityState visible_security_state_;
166 183
167 SecurityStateModelClient* client_; 184 SecurityStateModelClient* client_;
168 185
169 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); 186 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel);
170 }; 187 };
171 188
172 } // namespace security_state 189 } // namespace security_state
173 190
174 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ 191 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | components/security_state/security_state_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698