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

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

Issue 2472943004: HTTP Bad: Add a switch for showing both verbose state and form warning (Closed)
Patch Set: add a comment 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
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 25 matching lines...) Expand all
36 return true; 36 return true;
37 } 37 }
38 38
39 if (switch_or_field_trial_group == switches::kMarkHttpAsDangerous) { 39 if (switch_or_field_trial_group == switches::kMarkHttpAsDangerous) {
40 *level = SecurityStateModel::DANGEROUS; 40 *level = SecurityStateModel::DANGEROUS;
41 *histogram_status = NON_SECURE; 41 *histogram_status = NON_SECURE;
42 return true; 42 return true;
43 } 43 }
44 44
45 if (switch_or_field_trial_group == 45 if (switch_or_field_trial_group ==
46 switches::kMarkHttpWithPasswordsOrCcWithChip) { 46 switches::kMarkHttpWithPasswordsOrCcWithChip ||
47 switch_or_field_trial_group ==
48 switches::kMarkHttpWithPasswordsOrCcWithChipAndFormWarning) {
47 if (displayed_sensitive_input_on_http) { 49 if (displayed_sensitive_input_on_http) {
48 *level = SecurityStateModel::HTTP_SHOW_WARNING; 50 *level = SecurityStateModel::HTTP_SHOW_WARNING;
49 } else { 51 } else {
50 *level = SecurityStateModel::NONE; 52 *level = SecurityStateModel::NONE;
51 } 53 }
52 *histogram_status = HTTP_SHOW_WARNING; 54 *histogram_status = HTTP_SHOW_WARNING;
53 return true; 55 return true;
54 } 56 }
55 57
56 return false; 58 return false;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 other.displayed_content_with_cert_errors && 326 other.displayed_content_with_cert_errors &&
325 ran_content_with_cert_errors == other.ran_content_with_cert_errors && 327 ran_content_with_cert_errors == other.ran_content_with_cert_errors &&
326 pkp_bypassed == other.pkp_bypassed && 328 pkp_bypassed == other.pkp_bypassed &&
327 displayed_password_field_on_http == 329 displayed_password_field_on_http ==
328 other.displayed_password_field_on_http && 330 other.displayed_password_field_on_http &&
329 displayed_credit_card_field_on_http == 331 displayed_credit_card_field_on_http ==
330 other.displayed_credit_card_field_on_http); 332 other.displayed_credit_card_field_on_http);
331 } 333 }
332 334
333 } // namespace security_state 335 } // namespace security_state
OLDNEW
« no previous file with comments | « chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc ('k') | components/security_state/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698