| Index: chrome/browser/ui/webui/interstitials/interstitial_ui.cc
|
| diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
|
| index 70c4a34dd2c25973eedc351182d03b7424f949d1..8f5ac6d413b97ffae3abb18305ceb8fd8f756599 100644
|
| --- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
|
| +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
|
| @@ -156,14 +156,15 @@ BadClockBlockingPage* CreateBadClockBlockingPage(
|
| }
|
|
|
| // Determine whether to change the clock to be ahead or behind.
|
| - base::Time time_triggered_ = base::Time::NowFromSystemTime();
|
| std::string clock_manipulation_param;
|
| + ssl_errors::ClockState clock_state = ssl_errors::CLOCK_STATE_PAST;
|
| if (net::GetValueForKeyInQuery(web_contents->GetURL(), "clock_manipulation",
|
| &clock_manipulation_param)) {
|
| int time_offset;
|
| - if (!base::StringToInt(clock_manipulation_param, &time_offset))
|
| - time_offset = 2;
|
| - time_triggered_ += base::TimeDelta::FromDays(365 * time_offset);
|
| + if (base::StringToInt(clock_manipulation_param, &time_offset)) {
|
| + clock_state = time_offset > 0 ? ssl_errors::CLOCK_STATE_FUTURE
|
| + : ssl_errors::CLOCK_STATE_PAST;
|
| + }
|
| }
|
|
|
| net::SSLInfo ssl_info;
|
| @@ -176,8 +177,8 @@ BadClockBlockingPage* CreateBadClockBlockingPage(
|
| if (strict_enforcement)
|
| options_mask |= security_interstitials::SSLErrorUI::STRICT_ENFORCEMENT;
|
| return new BadClockBlockingPage(web_contents, cert_error, ssl_info,
|
| - request_url, time_triggered_, nullptr,
|
| - base::Callback<void(bool)>());
|
| + request_url, base::Time::Now(), clock_state,
|
| + nullptr, base::Callback<void(bool)>());
|
| }
|
|
|
| safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
|
|
|