| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 DCHECK(visible_security_state.connection_info_initialized || | 93 DCHECK(visible_security_state.connection_info_initialized || |
| 94 visible_security_state.fails_malware_check); | 94 visible_security_state.fails_malware_check); |
| 95 | 95 |
| 96 // Override the connection security information if the website failed the | 96 // Override the connection security information if the website failed the |
| 97 // browser's malware checks. | 97 // browser's malware checks. |
| 98 if (visible_security_state.fails_malware_check) | 98 if (visible_security_state.fails_malware_check) |
| 99 return SecurityStateModel::SECURITY_ERROR; | 99 return SecurityStateModel::SECURITY_ERROR; |
| 100 | 100 |
| 101 GURL url = visible_security_state.url; | 101 GURL url = visible_security_state.url; |
| 102 switch (visible_security_state.initial_security_level) { | 102 switch (visible_security_state.initial_security_level) { |
| 103 case SecurityStateModel::NONE: { | 103 case SecurityStateModel::NONE: |
| 104 case SecurityStateModel::HTTP_WARNING: { |
| 104 if (!client->IsOriginSecure(url) && url.IsStandard()) | 105 if (!client->IsOriginSecure(url) && url.IsStandard()) |
| 105 return GetSecurityLevelForNonSecureFieldTrial(); | 106 return GetSecurityLevelForNonSecureFieldTrial(); |
| 106 return SecurityStateModel::NONE; | 107 return SecurityStateModel::NONE; |
| 107 } | 108 } |
| 108 | 109 |
| 109 case SecurityStateModel::SECURITY_ERROR: | 110 case SecurityStateModel::SECURITY_ERROR: |
| 110 return SecurityStateModel::SECURITY_ERROR; | 111 return SecurityStateModel::SECURITY_ERROR; |
| 111 | 112 |
| 112 case SecurityStateModel::SECURITY_WARNING: | 113 case SecurityStateModel::SECURITY_WARNING: |
| 113 case SecurityStateModel::SECURITY_POLICY_WARNING: | 114 case SecurityStateModel::SECURITY_POLICY_WARNING: |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 sct_verify_statuses == other.sct_verify_statuses && | 316 sct_verify_statuses == other.sct_verify_statuses && |
| 316 displayed_mixed_content == other.displayed_mixed_content && | 317 displayed_mixed_content == other.displayed_mixed_content && |
| 317 ran_mixed_content == other.ran_mixed_content && | 318 ran_mixed_content == other.ran_mixed_content && |
| 318 displayed_content_with_cert_errors == | 319 displayed_content_with_cert_errors == |
| 319 other.displayed_content_with_cert_errors && | 320 other.displayed_content_with_cert_errors && |
| 320 ran_content_with_cert_errors == other.ran_content_with_cert_errors && | 321 ran_content_with_cert_errors == other.ran_content_with_cert_errors && |
| 321 pkp_bypassed == other.pkp_bypassed); | 322 pkp_bypassed == other.pkp_bypassed); |
| 322 } | 323 } |
| 323 | 324 |
| 324 } // namespace security_state | 325 } // namespace security_state |
| OLD | NEW |