OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 6 #define CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // A function which calculates the severity score when the ssl error is | 65 // A function which calculates the severity score when the ssl error is |
66 // |CERT_AUTHORITY_INVALID|, returns a score between 0.0 and 1.0, higher | 66 // |CERT_AUTHORITY_INVALID|, returns a score between 0.0 and 1.0, higher |
67 // values being more severe, indicating how severe the certificate's | 67 // values being more severe, indicating how severe the certificate's |
68 // authority invalid error is. | 68 // authority invalid error is. |
69 void InvalidAuthoritySeverityScore(); | 69 void InvalidAuthoritySeverityScore(); |
70 | 70 |
71 void RecordUMAStatistics(bool overridable) const; | 71 void RecordUMAStatistics(bool overridable) const; |
72 void RecordCaptivePortalUMAStatistics(bool overridable) const; | 72 void RecordCaptivePortalUMAStatistics(bool overridable) const; |
73 base::TimeDelta TimePassedSinceExpiry() const; | 73 base::TimeDelta TimePassedSinceExpiry() const; |
74 | 74 |
| 75 const GURL& GetRequestURL(); |
| 76 |
75 private: | 77 private: |
76 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestDateInvalidScore); | 78 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestDateInvalidScore); |
77 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestNameMismatch); | 79 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, TestNameMismatch); |
78 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, | 80 FRIEND_TEST_ALL_PREFIXES(SSLErrorClassificationTest, |
79 TestHostNameHasKnownTLD); | 81 TestHostNameHasKnownTLD); |
80 | 82 |
81 typedef std::vector<std::string> Tokens; | 83 typedef std::vector<std::string> Tokens; |
82 | 84 |
83 // Returns true if the hostname has a known Top Level Domain. | 85 // Returns true if the hostname has a known Top Level Domain. |
84 static bool IsHostNameKnownTLD(const std::string& host_name); | 86 static bool IsHostNameKnownTLD(const std::string& host_name); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool captive_portal_probe_completed_; | 157 bool captive_portal_probe_completed_; |
156 // Did the captive portal probe receive an error or get a non-HTTP response? | 158 // Did the captive portal probe receive an error or get a non-HTTP response? |
157 bool captive_portal_no_response_; | 159 bool captive_portal_no_response_; |
158 // Was a captive portal detected? | 160 // Was a captive portal detected? |
159 bool captive_portal_detected_; | 161 bool captive_portal_detected_; |
160 | 162 |
161 content::NotificationRegistrar registrar_; | 163 content::NotificationRegistrar registrar_; |
162 }; | 164 }; |
163 | 165 |
164 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 166 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
OLD | NEW |