| OLD | NEW |
| 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 #include "components/security_state/security_state_model.h" | 5 #include "components/security_state/security_state_model.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 security_info->sha1_deprecation_status = | 199 security_info->sha1_deprecation_status = |
| 200 GetSHA1DeprecationStatus(cert, visible_security_state); | 200 GetSHA1DeprecationStatus(cert, visible_security_state); |
| 201 security_info->mixed_content_status = | 201 security_info->mixed_content_status = |
| 202 GetContentStatus(visible_security_state.displayed_mixed_content, | 202 GetContentStatus(visible_security_state.displayed_mixed_content, |
| 203 visible_security_state.ran_mixed_content); | 203 visible_security_state.ran_mixed_content); |
| 204 security_info->content_with_cert_errors_status = GetContentStatus( | 204 security_info->content_with_cert_errors_status = GetContentStatus( |
| 205 visible_security_state.displayed_content_with_cert_errors, | 205 visible_security_state.displayed_content_with_cert_errors, |
| 206 visible_security_state.ran_content_with_cert_errors); | 206 visible_security_state.ran_content_with_cert_errors); |
| 207 security_info->security_bits = visible_security_state.security_bits; | 207 security_info->security_bits = visible_security_state.security_bits; |
| 208 security_info->connection_status = visible_security_state.connection_status; | 208 security_info->connection_status = visible_security_state.connection_status; |
| 209 security_info->key_exchange_group = visible_security_state.key_exchange_group; |
| 209 security_info->cert_status = visible_security_state.cert_status; | 210 security_info->cert_status = visible_security_state.cert_status; |
| 210 security_info->scheme_is_cryptographic = | 211 security_info->scheme_is_cryptographic = |
| 211 visible_security_state.url.SchemeIsCryptographic(); | 212 visible_security_state.url.SchemeIsCryptographic(); |
| 212 security_info->obsolete_ssl_status = | 213 security_info->obsolete_ssl_status = |
| 213 net::ObsoleteSSLStatus(security_info->connection_status); | 214 net::ObsoleteSSLStatus(security_info->connection_status); |
| 214 security_info->pkp_bypassed = visible_security_state.pkp_bypassed; | 215 security_info->pkp_bypassed = visible_security_state.pkp_bypassed; |
| 215 security_info->sct_verify_statuses = | 216 security_info->sct_verify_statuses = |
| 216 visible_security_state.sct_verify_statuses; | 217 visible_security_state.sct_verify_statuses; |
| 217 | 218 |
| 218 security_info->fails_malware_check = | 219 security_info->fails_malware_check = |
| (...skipping 18 matching lines...) Expand all Loading... |
| 237 SecurityStateModel::SecurityInfo::SecurityInfo() | 238 SecurityStateModel::SecurityInfo::SecurityInfo() |
| 238 : security_level(SecurityStateModel::NONE), | 239 : security_level(SecurityStateModel::NONE), |
| 239 fails_malware_check(false), | 240 fails_malware_check(false), |
| 240 sha1_deprecation_status(SecurityStateModel::NO_DEPRECATED_SHA1), | 241 sha1_deprecation_status(SecurityStateModel::NO_DEPRECATED_SHA1), |
| 241 mixed_content_status(SecurityStateModel::CONTENT_STATUS_NONE), | 242 mixed_content_status(SecurityStateModel::CONTENT_STATUS_NONE), |
| 242 content_with_cert_errors_status(SecurityStateModel::CONTENT_STATUS_NONE), | 243 content_with_cert_errors_status(SecurityStateModel::CONTENT_STATUS_NONE), |
| 243 scheme_is_cryptographic(false), | 244 scheme_is_cryptographic(false), |
| 244 cert_status(0), | 245 cert_status(0), |
| 245 security_bits(-1), | 246 security_bits(-1), |
| 246 connection_status(0), | 247 connection_status(0), |
| 248 key_exchange_group(0), |
| 247 obsolete_ssl_status(net::OBSOLETE_SSL_NONE), | 249 obsolete_ssl_status(net::OBSOLETE_SSL_NONE), |
| 248 pkp_bypassed(false) {} | 250 pkp_bypassed(false) {} |
| 249 | 251 |
| 250 SecurityStateModel::SecurityInfo::~SecurityInfo() {} | 252 SecurityStateModel::SecurityInfo::~SecurityInfo() {} |
| 251 | 253 |
| 252 SecurityStateModel::SecurityStateModel() {} | 254 SecurityStateModel::SecurityStateModel() {} |
| 253 | 255 |
| 254 SecurityStateModel::~SecurityStateModel() {} | 256 SecurityStateModel::~SecurityStateModel() {} |
| 255 | 257 |
| 256 const SecurityStateModel::SecurityInfo& SecurityStateModel::GetSecurityInfo() | 258 const SecurityStateModel::SecurityInfo& SecurityStateModel::GetSecurityInfo() |
| (...skipping 25 matching lines...) Expand all Loading... |
| 282 void SecurityStateModel::SetClient(SecurityStateModelClient* client) { | 284 void SecurityStateModel::SetClient(SecurityStateModelClient* client) { |
| 283 client_ = client; | 285 client_ = client; |
| 284 } | 286 } |
| 285 | 287 |
| 286 SecurityStateModel::VisibleSecurityState::VisibleSecurityState() | 288 SecurityStateModel::VisibleSecurityState::VisibleSecurityState() |
| 287 : initial_security_level(SecurityStateModel::NONE), | 289 : initial_security_level(SecurityStateModel::NONE), |
| 288 fails_malware_check(false), | 290 fails_malware_check(false), |
| 289 connection_info_initialized(false), | 291 connection_info_initialized(false), |
| 290 cert_status(0), | 292 cert_status(0), |
| 291 connection_status(0), | 293 connection_status(0), |
| 294 key_exchange_group(0), |
| 292 security_bits(-1), | 295 security_bits(-1), |
| 293 displayed_mixed_content(false), | 296 displayed_mixed_content(false), |
| 294 ran_mixed_content(false), | 297 ran_mixed_content(false), |
| 295 displayed_content_with_cert_errors(false), | 298 displayed_content_with_cert_errors(false), |
| 296 ran_content_with_cert_errors(false), | 299 ran_content_with_cert_errors(false), |
| 297 pkp_bypassed(false) {} | 300 pkp_bypassed(false) {} |
| 298 | 301 |
| 299 SecurityStateModel::VisibleSecurityState::~VisibleSecurityState() {} | 302 SecurityStateModel::VisibleSecurityState::~VisibleSecurityState() {} |
| 300 | 303 |
| 301 bool SecurityStateModel::VisibleSecurityState::operator==( | 304 bool SecurityStateModel::VisibleSecurityState::operator==( |
| 302 const SecurityStateModel::VisibleSecurityState& other) const { | 305 const SecurityStateModel::VisibleSecurityState& other) const { |
| 303 return (url == other.url && | 306 return (url == other.url && |
| 304 initial_security_level == other.initial_security_level && | 307 initial_security_level == other.initial_security_level && |
| 305 fails_malware_check == other.fails_malware_check && | 308 fails_malware_check == other.fails_malware_check && |
| 306 !!certificate == !!other.certificate && | 309 !!certificate == !!other.certificate && |
| 307 (certificate ? certificate->Equals(other.certificate.get()) : true) && | 310 (certificate ? certificate->Equals(other.certificate.get()) : true) && |
| 308 connection_status == other.connection_status && | 311 connection_status == other.connection_status && |
| 312 key_exchange_group == other.key_exchange_group && |
| 309 security_bits == other.security_bits && | 313 security_bits == other.security_bits && |
| 310 sct_verify_statuses == other.sct_verify_statuses && | 314 sct_verify_statuses == other.sct_verify_statuses && |
| 311 displayed_mixed_content == other.displayed_mixed_content && | 315 displayed_mixed_content == other.displayed_mixed_content && |
| 312 ran_mixed_content == other.ran_mixed_content && | 316 ran_mixed_content == other.ran_mixed_content && |
| 313 displayed_content_with_cert_errors == | 317 displayed_content_with_cert_errors == |
| 314 other.displayed_content_with_cert_errors && | 318 other.displayed_content_with_cert_errors && |
| 315 ran_content_with_cert_errors == other.ran_content_with_cert_errors && | 319 ran_content_with_cert_errors == other.ran_content_with_cert_errors && |
| 316 pkp_bypassed == other.pkp_bypassed); | 320 pkp_bypassed == other.pkp_bypassed); |
| 317 } | 321 } |
| 318 | 322 |
| 319 } // namespace security_state | 323 } // namespace security_state |
| OLD | NEW |