| 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 "chrome/browser/ssl/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" |
| 11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "chrome/browser/ssl/security_state_model_client.h" | 12 #include "components/security_state/security_state_model_client.h" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "components/security_state/switches.h" |
| 14 #include "net/ssl/ssl_cipher_suite_names.h" | 14 #include "net/ssl/ssl_cipher_suite_names.h" |
| 15 #include "net/ssl/ssl_connection_status_flags.h" | 15 #include "net/ssl/ssl_connection_status_flags.h" |
| 16 | 16 |
| 17 namespace security_state { |
| 18 |
| 17 namespace { | 19 namespace { |
| 18 | 20 |
| 19 SecurityStateModel::SecurityLevel GetSecurityLevelForNonSecureFieldTrial() { | 21 SecurityStateModel::SecurityLevel GetSecurityLevelForNonSecureFieldTrial() { |
| 20 // TODO(estark): componentize switches::kMarkNonSecureAs. | |
| 21 // https://crbug.com/515071 | |
| 22 std::string choice = | 22 std::string choice = |
| 23 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 23 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 24 switches::kMarkNonSecureAs); | 24 switches::kMarkNonSecureAs); |
| 25 std::string group = base::FieldTrialList::FindFullName("MarkNonSecureAs"); | 25 std::string group = base::FieldTrialList::FindFullName("MarkNonSecureAs"); |
| 26 | 26 |
| 27 // Do not change this enum. It is used in the histogram. | 27 // Do not change this enum. It is used in the histogram. |
| 28 enum MarkNonSecureStatus { NEUTRAL, DUBIOUS, NON_SECURE, LAST_STATUS }; | 28 enum MarkNonSecureStatus { NEUTRAL, DUBIOUS, NON_SECURE, LAST_STATUS }; |
| 29 const char kEnumeration[] = "MarkNonSecureAs"; | 29 const char kEnumeration[] = "MarkNonSecureAs"; |
| 30 | 30 |
| 31 SecurityStateModel::SecurityLevel level = SecurityStateModel::NONE; | 31 SecurityStateModel::SecurityLevel level = SecurityStateModel::NONE; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 const SecurityStateModel::VisibleSecurityState& other) const { | 271 const SecurityStateModel::VisibleSecurityState& other) const { |
| 272 return (url == other.url && | 272 return (url == other.url && |
| 273 initial_security_level == other.initial_security_level && | 273 initial_security_level == other.initial_security_level && |
| 274 cert_id == other.cert_id && cert_status == other.cert_status && | 274 cert_id == other.cert_id && cert_status == other.cert_status && |
| 275 connection_status == other.connection_status && | 275 connection_status == other.connection_status && |
| 276 security_bits == other.security_bits && | 276 security_bits == other.security_bits && |
| 277 sct_verify_statuses == other.sct_verify_statuses && | 277 sct_verify_statuses == other.sct_verify_statuses && |
| 278 displayed_mixed_content == other.displayed_mixed_content && | 278 displayed_mixed_content == other.displayed_mixed_content && |
| 279 ran_mixed_content == other.ran_mixed_content); | 279 ran_mixed_content == other.ran_mixed_content); |
| 280 } | 280 } |
| 281 |
| 282 } // namespace security_state |
| OLD | NEW |