Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: components/security_state/security_state_model.cc

Issue 2453063002: Use correct histogram name in security_state_model (Closed)
Patch Set: Fix nits Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/security_state/security_state_model_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return false; 57 return false;
58 } 58 }
59 59
60 SecurityStateModel::SecurityLevel GetSecurityLevelForNonSecureFieldTrial( 60 SecurityStateModel::SecurityLevel GetSecurityLevelForNonSecureFieldTrial(
61 bool displayed_sensitive_input_on_http) { 61 bool displayed_sensitive_input_on_http) {
62 std::string choice = 62 std::string choice =
63 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 63 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
64 switches::kMarkHttpAs); 64 switches::kMarkHttpAs);
65 std::string group = base::FieldTrialList::FindFullName("MarkNonSecureAs"); 65 std::string group = base::FieldTrialList::FindFullName("MarkNonSecureAs");
66 66
67 const char kEnumeration[] = "MarkHttpAs"; 67 const char kEnumeration[] = "SSL.MarkHttpAsStatus";
68 68
69 SecurityStateModel::SecurityLevel level = SecurityStateModel::NONE; 69 SecurityStateModel::SecurityLevel level = SecurityStateModel::NONE;
70 MarkHttpStatus status; 70 MarkHttpStatus status;
71 71
72 // If the command-line switch is set, then it takes precedence over 72 // If the command-line switch is set, then it takes precedence over
73 // the field trial group. 73 // the field trial group.
74 if (!GetSecurityLevelAndHistogramValueForNonSecureFieldTrial( 74 if (!GetSecurityLevelAndHistogramValueForNonSecureFieldTrial(
75 choice, displayed_sensitive_input_on_http, &level, &status)) { 75 choice, displayed_sensitive_input_on_http, &level, &status)) {
76 if (!GetSecurityLevelAndHistogramValueForNonSecureFieldTrial( 76 if (!GetSecurityLevelAndHistogramValueForNonSecureFieldTrial(
77 group, displayed_sensitive_input_on_http, &level, &status)) { 77 group, displayed_sensitive_input_on_http, &level, &status)) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 other.displayed_content_with_cert_errors && 325 other.displayed_content_with_cert_errors &&
326 ran_content_with_cert_errors == other.ran_content_with_cert_errors && 326 ran_content_with_cert_errors == other.ran_content_with_cert_errors &&
327 pkp_bypassed == other.pkp_bypassed && 327 pkp_bypassed == other.pkp_bypassed &&
328 displayed_password_field_on_http == 328 displayed_password_field_on_http ==
329 other.displayed_password_field_on_http && 329 other.displayed_password_field_on_http &&
330 displayed_credit_card_field_on_http == 330 displayed_credit_card_field_on_http ==
331 other.displayed_credit_card_field_on_http); 331 other.displayed_credit_card_field_on_http);
332 } 332 }
333 333
334 } // namespace security_state 334 } // namespace security_state
OLDNEW
« no previous file with comments | « no previous file | components/security_state/security_state_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698