| 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 19 matching lines...) Expand all Loading... |
| 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 cert_id(0), | 246 cert_id(0), |
| 246 security_bits(-1), | 247 security_bits(-1), |
| 247 connection_status(0), | 248 connection_status(0), |
| 249 key_exchange_group(0), |
| 248 obsolete_ssl_status(net::OBSOLETE_SSL_NONE), | 250 obsolete_ssl_status(net::OBSOLETE_SSL_NONE), |
| 249 pkp_bypassed(false) {} | 251 pkp_bypassed(false) {} |
| 250 | 252 |
| 251 SecurityStateModel::SecurityInfo::~SecurityInfo() {} | 253 SecurityStateModel::SecurityInfo::~SecurityInfo() {} |
| 252 | 254 |
| 253 SecurityStateModel::SecurityStateModel() {} | 255 SecurityStateModel::SecurityStateModel() {} |
| 254 | 256 |
| 255 SecurityStateModel::~SecurityStateModel() {} | 257 SecurityStateModel::~SecurityStateModel() {} |
| 256 | 258 |
| 257 const SecurityStateModel::SecurityInfo& SecurityStateModel::GetSecurityInfo() | 259 const SecurityStateModel::SecurityInfo& SecurityStateModel::GetSecurityInfo() |
| (...skipping 26 matching lines...) Expand all Loading... |
| 284 client_ = client; | 286 client_ = client; |
| 285 } | 287 } |
| 286 | 288 |
| 287 SecurityStateModel::VisibleSecurityState::VisibleSecurityState() | 289 SecurityStateModel::VisibleSecurityState::VisibleSecurityState() |
| 288 : initial_security_level(SecurityStateModel::NONE), | 290 : initial_security_level(SecurityStateModel::NONE), |
| 289 fails_malware_check(false), | 291 fails_malware_check(false), |
| 290 connection_info_initialized(false), | 292 connection_info_initialized(false), |
| 291 cert_id(0), | 293 cert_id(0), |
| 292 cert_status(0), | 294 cert_status(0), |
| 293 connection_status(0), | 295 connection_status(0), |
| 296 key_exchange_group(0), |
| 294 security_bits(-1), | 297 security_bits(-1), |
| 295 displayed_mixed_content(false), | 298 displayed_mixed_content(false), |
| 296 ran_mixed_content(false), | 299 ran_mixed_content(false), |
| 297 displayed_content_with_cert_errors(false), | 300 displayed_content_with_cert_errors(false), |
| 298 ran_content_with_cert_errors(false), | 301 ran_content_with_cert_errors(false), |
| 299 pkp_bypassed(false) {} | 302 pkp_bypassed(false) {} |
| 300 | 303 |
| 301 SecurityStateModel::VisibleSecurityState::~VisibleSecurityState() {} | 304 SecurityStateModel::VisibleSecurityState::~VisibleSecurityState() {} |
| 302 | 305 |
| 303 bool SecurityStateModel::VisibleSecurityState::operator==( | 306 bool SecurityStateModel::VisibleSecurityState::operator==( |
| 304 const SecurityStateModel::VisibleSecurityState& other) const { | 307 const SecurityStateModel::VisibleSecurityState& other) const { |
| 305 return (url == other.url && | 308 return (url == other.url && |
| 306 initial_security_level == other.initial_security_level && | 309 initial_security_level == other.initial_security_level && |
| 307 fails_malware_check == other.fails_malware_check && | 310 fails_malware_check == other.fails_malware_check && |
| 308 cert_id == other.cert_id && cert_status == other.cert_status && | 311 cert_id == other.cert_id && cert_status == other.cert_status && |
| 309 connection_status == other.connection_status && | 312 connection_status == other.connection_status && |
| 313 key_exchange_group == other.key_exchange_group && |
| 310 security_bits == other.security_bits && | 314 security_bits == other.security_bits && |
| 311 sct_verify_statuses == other.sct_verify_statuses && | 315 sct_verify_statuses == other.sct_verify_statuses && |
| 312 displayed_mixed_content == other.displayed_mixed_content && | 316 displayed_mixed_content == other.displayed_mixed_content && |
| 313 ran_mixed_content == other.ran_mixed_content && | 317 ran_mixed_content == other.ran_mixed_content && |
| 314 displayed_content_with_cert_errors == | 318 displayed_content_with_cert_errors == |
| 315 other.displayed_content_with_cert_errors && | 319 other.displayed_content_with_cert_errors && |
| 316 ran_content_with_cert_errors == other.ran_content_with_cert_errors && | 320 ran_content_with_cert_errors == other.ran_content_with_cert_errors && |
| 317 pkp_bypassed == other.pkp_bypassed); | 321 pkp_bypassed == other.pkp_bypassed); |
| 318 } | 322 } |
| 319 | 323 |
| 320 } // namespace security_state | 324 } // namespace security_state |
| OLD | NEW |