| 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 22 matching lines...) Expand all Loading... |
| 33 const net::X509Certificate& cert); | 33 const net::X509Certificate& cert); |
| 34 virtual ~SSLErrorClassification(); | 34 virtual ~SSLErrorClassification(); |
| 35 | 35 |
| 36 // Returns true if the system time is in the past. | 36 // Returns true if the system time is in the past. |
| 37 static bool IsUserClockInThePast(const base::Time& time_now); | 37 static bool IsUserClockInThePast(const base::Time& time_now); |
| 38 | 38 |
| 39 // Returns true if the system time is too far in the future or the user is | 39 // Returns true if the system time is too far in the future or the user is |
| 40 // using a version of Chrome which is more than 1 year old. | 40 // using a version of Chrome which is more than 1 year old. |
| 41 static bool IsUserClockInTheFuture(const base::Time& time_now); | 41 static bool IsUserClockInTheFuture(const base::Time& time_now); |
| 42 | 42 |
| 43 static bool IsWindowsVersionSP3OrLower(); | 43 // Returns true if the OS platform is likely to have SHA-256 support. |
| 44 static bool MaybeOSHasSHA256Support(); |
| 44 | 45 |
| 45 // A function which calculates the severity score when the ssl error is | 46 // A function which calculates the severity score when the ssl error is |
| 46 // |CERT_DATE_INVALID|. The calculated score is between 0.0 and 1.0, higher | 47 // |CERT_DATE_INVALID|. The calculated score is between 0.0 and 1.0, higher |
| 47 // being more severe, indicating how severe the certificate's | 48 // being more severe, indicating how severe the certificate's |
| 48 // date invalid error is. | 49 // date invalid error is. |
| 49 void InvalidDateSeverityScore(); | 50 void InvalidDateSeverityScore(); |
| 50 | 51 |
| 51 // A function which calculates the severity score when the ssl error is | 52 // A function which calculates the severity score when the ssl error is |
| 52 // |CERT_COMMON_NAME_INVALID|. The calculated score is between 0.0 and 1.0, | 53 // |CERT_COMMON_NAME_INVALID|. The calculated score is between 0.0 and 1.0, |
| 53 // higher being more severe, indicating how severe the certificate's common | 54 // higher being more severe, indicating how severe the certificate's common |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 bool captive_portal_probe_completed_; | 143 bool captive_portal_probe_completed_; |
| 143 // Did the captive portal probe receive an error or get a non-HTTP response? | 144 // Did the captive portal probe receive an error or get a non-HTTP response? |
| 144 bool captive_portal_no_response_; | 145 bool captive_portal_no_response_; |
| 145 // Was a captive portal detected? | 146 // Was a captive portal detected? |
| 146 bool captive_portal_detected_; | 147 bool captive_portal_detected_; |
| 147 | 148 |
| 148 content::NotificationRegistrar registrar_; | 149 content::NotificationRegistrar registrar_; |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 152 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
| OLD | NEW |