| 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 ~SSLErrorClassification() override; | 34 ~SSLErrorClassification() override; |
| 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 // Sets a clock for browser tests that check the build time. Used by |
| 44 // IsUserClockInThePast and IsUserClockInTheFuture. |
| 45 static void SetBuildTimeForTesting(const base::Time& testing_time); |
| 46 |
| 43 // Returns true if the Windows platform is likely to not have SHA-256 support. | 47 // Returns true if the Windows platform is likely to not have SHA-256 support. |
| 44 // On other platforms, returns false always. | 48 // On other platforms, returns false always. |
| 45 static bool MaybeWindowsLacksSHA256Support(); | 49 static bool MaybeWindowsLacksSHA256Support(); |
| 46 | 50 |
| 47 // Returns true if any one of the following conditions hold: | 51 // Returns true if any one of the following conditions hold: |
| 48 // 1.|hostname| is an IP Address in an IANA-reserved range. | 52 // 1.|hostname| is an IP Address in an IANA-reserved range. |
| 49 // 2.|hostname| is a not-yet-assigned by ICANN gTLD. | 53 // 2.|hostname| is a not-yet-assigned by ICANN gTLD. |
| 50 // 3.|hostname| is a dotless domain. | 54 // 3.|hostname| is a dotless domain. |
| 51 static bool IsHostnameNonUniqueOrDotless(const std::string& hostname); | 55 static bool IsHostnameNonUniqueOrDotless(const std::string& hostname); |
| 52 | 56 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 bool captive_portal_probe_completed_; | 170 bool captive_portal_probe_completed_; |
| 167 // Did the captive portal probe receive an error or get a non-HTTP response? | 171 // Did the captive portal probe receive an error or get a non-HTTP response? |
| 168 bool captive_portal_no_response_; | 172 bool captive_portal_no_response_; |
| 169 // Was a captive portal detected? | 173 // Was a captive portal detected? |
| 170 bool captive_portal_detected_; | 174 bool captive_portal_detected_; |
| 171 | 175 |
| 172 content::NotificationRegistrar registrar_; | 176 content::NotificationRegistrar registrar_; |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ | 179 #endif // CHROME_BROWSER_SSL_SSL_ERROR_CLASSIFICATION_H_ |
| OLD | NEW |