Chromium Code Reviews| Index: chrome/browser/ssl/ssl_error_handler.cc |
| diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc |
| index 4e0a84bfa43deac3a4b5778737ba413f563e50ea..706b59913ddb0b8a46b37ac28ef506d9ce0eb6a2 100644 |
| --- a/chrome/browser/ssl/ssl_error_handler.cc |
| +++ b/chrome/browser/ssl/ssl_error_handler.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/strings/stringprintf.h" |
| #include "base/time/clock.h" |
| #include "base/time/time.h" |
| +#include "chrome/browser/browser_process.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ssl/bad_clock_blocking_page.h" |
| #include "chrome/browser/ssl/ssl_blocking_page.h" |
| @@ -33,6 +34,10 @@ |
| #include "chrome/browser/ssl/captive_portal_blocking_page.h" |
| #endif |
| +namespace network_time { |
| +class NetworkTimeTracker; |
| +} |
| + |
| namespace { |
| // The delay in milliseconds before displaying the SSL interstitial. |
| @@ -141,8 +146,16 @@ bool IsErrorDueToBadClock(const base::Time& now, int error) { |
| ssl_errors::ErrorInfo::CERT_DATE_INVALID) { |
| return false; |
| } |
| - return ssl_errors::IsUserClockInThePast(now) || |
| - ssl_errors::IsUserClockInTheFuture(now); |
| + switch (ssl_errors::GetClockState(now, |
| + g_browser_process->network_time_tracker(), |
| + true /* record statistics */)) { |
|
estark
2016/03/12 07:54:53
Sorry, I promise this'll be the last annoying ques
mab
2016/03/14 21:25:25
Not at all; I should have done it this way to begi
estark
2016/03/15 05:50:00
That sounds reasonable. I think we'd still want to
|
| + case ssl_errors::CLOCK_STATE_FUTURE: |
| + return true; |
| + case ssl_errors::CLOCK_STATE_PAST: |
| + return true; |
| + default: |
| + return false; |
| + } |
| } |
| } // namespace |