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/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 state->ran_mixed_content = ran_mixed_content_; | 84 state->ran_mixed_content = ran_mixed_content_; |
85 state->fails_malware_check = fails_malware_check_; | 85 state->fails_malware_check = fails_malware_check_; |
86 state->displayed_password_field_on_http = displayed_password_field_on_http_; | 86 state->displayed_password_field_on_http = displayed_password_field_on_http_; |
87 state->displayed_credit_card_field_on_http = | 87 state->displayed_credit_card_field_on_http = |
88 displayed_credit_card_field_on_http_; | 88 displayed_credit_card_field_on_http_; |
89 } | 89 } |
90 | 90 |
91 bool UsedPolicyInstalledCertificate() override { return false; } | 91 bool UsedPolicyInstalledCertificate() override { return false; } |
92 | 92 |
93 bool IsOriginSecure(const GURL& url) override { | 93 bool IsOriginSecure(const GURL& url) override { |
94 return url_ == GURL(kHttpsUrl); | 94 return url_ == kHttpsUrl; |
95 } | 95 } |
96 | 96 |
97 private: | 97 private: |
98 GURL url_; | 98 GURL url_; |
99 scoped_refptr<net::X509Certificate> cert_; | 99 scoped_refptr<net::X509Certificate> cert_; |
100 int connection_status_; | 100 int connection_status_; |
101 net::CertStatus cert_status_; | 101 net::CertStatus cert_status_; |
102 bool displayed_mixed_content_; | 102 bool displayed_mixed_content_; |
103 bool ran_mixed_content_; | 103 bool ran_mixed_content_; |
104 bool fails_malware_check_; | 104 bool fails_malware_check_; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 // Ensure histogram recorded correctly even without a password input. | 326 // Ensure histogram recorded correctly even without a password input. |
327 client.set_displayed_password_field_on_http(false); | 327 client.set_displayed_password_field_on_http(false); |
328 model.GetSecurityInfo(&security_info); | 328 model.GetSecurityInfo(&security_info); |
329 histograms.ExpectUniqueSample(kHistogramName, 2 /* HTTP_SHOW_WARNING */, 2); | 329 histograms.ExpectUniqueSample(kHistogramName, 2 /* HTTP_SHOW_WARNING */, 2); |
330 } | 330 } |
331 | 331 |
332 } // namespace | 332 } // namespace |
333 | 333 |
334 } // namespace security_state | 334 } // namespace security_state |
OLD | NEW |