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