Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Issue 1772143002: Use network time for bad clock interstitial. (Closed)

Created:
4 years, 9 months ago by mab
Modified:
4 years, 9 months ago
CC:
chromium-reviews, blundell+watchlist_chromium.org, sdefresne+watchlist_chromium.org, droger+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use network time for bad clock interstitial. This change supplements the existing build-time heuristic (which renders the bad-clock interstitial only when the system clock is outside the range (build-2d,build+365d)) with a comparison of the system clock to network time, fetched from |NetworkTimeTracker|. Network time has priority: if the network time says the clock is accurate, the bad-clock intersitial will not be used. The |CLOCK_FUTURE| and |CLOCK_PAST| metrics are recorded only when the interstitial is shown, however the decision was made. The new histograms |interstitial.ssl.clockstate.build_time| and |interstitial.ssl.clockstate.network| provide data about the state of the system clock whenever a |CERT_DATE_INVALID| error is encountered. This should help us to assess the effects of the change. Future work will focus on providing better network time in more cases. BUG=589700 Committed: https://crrev.com/740b02b74735910ec8e185d6375d4eda3f15e0ba Cr-Commit-Position: refs/heads/master@{#381837}

Patch Set 1 #

Patch Set 2 : IOS #

Total comments: 26

Patch Set 3 : estark review 1 #

Total comments: 8

Patch Set 4 : estark review 2 #

Total comments: 16

Patch Set 5 : estark review 3 #

Total comments: 6

Patch Set 6 : felt review 1 #

Patch Set 7 : estark review 4 #

Total comments: 5

Patch Set 8 : estark review 5 #

Patch Set 9 : estark review 8 #

Patch Set 10 : estark review 9 #

Total comments: 6

Patch Set 11 : estark review 10 #

Patch Set 12 : pass "gn check out/Default" #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -76 lines) Patch
M chrome/browser/ssl/bad_clock_blocking_page.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ssl/bad_clock_blocking_page.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 chunks +29 lines, -7 lines 0 comments Download
M chrome/browser/ssl/ssl_error_handler.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ssl/ssl_error_handler.cc View 1 2 3 4 5 6 7 8 5 chunks +19 lines, -14 lines 0 comments Download
M chrome/browser/ui/webui/interstitials/interstitial_ui.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -6 lines 0 comments Download
M components/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/security_interstitials/core/bad_clock_ui.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M components/security_interstitials/core/bad_clock_ui.cc View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -7 lines 0 comments Download
M components/ssl_errors/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M components/ssl_errors/DEPS View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M components/ssl_errors/error_classification.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +36 lines, -5 lines 0 comments Download
M components/ssl_errors/error_classification.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +62 lines, -32 lines 0 comments Download
M components/ssl_errors/error_classification_unittest.cc View 1 2 3 4 7 8 2 chunks +78 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 3 chunks +34 lines, -2 lines 0 comments Download

Messages

Total messages: 53 (17 generated)
mab
This CL is mostly to establish the plumbing for NetworkTimeTracker, but I see no reason ...
4 years, 9 months ago (2016-03-08 02:00:26 UTC) #3
estark
Thanks! A few comments inline. Could you also please expand the CL description to indicate ...
4 years, 9 months ago (2016-03-08 23:17:37 UTC) #4
mab
https://codereview.chromium.org/1772143002/diff/20001/chrome/browser/ssl/ssl_browser_tests.cc File chrome/browser/ssl/ssl_browser_tests.cc (right): https://codereview.chromium.org/1772143002/diff/20001/chrome/browser/ssl/ssl_browser_tests.cc#newcode908 chrome/browser/ssl/ssl_browser_tests.cc:908: mock_clock->SetNow(base::Time::NowFromSystemTime()); Makes sense, done. https://codereview.chromium.org/1772143002/diff/20001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/20001/chrome/browser/ssl/ssl_error_handler.cc#newcode149 ...
4 years, 9 months ago (2016-03-09 23:35:28 UTC) #5
estark
https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc File components/ssl_errors/error_classification.cc (left): https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc#oldcode133 components/ssl_errors/error_classification.cc:133: } else if (IsUserClockInTheFuture(base::Time::NowFromSystemTime())) { On 2016/03/09 23:35:28, mab ...
4 years, 9 months ago (2016-03-10 20:10:09 UTC) #6
mab
https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc File components/ssl_errors/error_classification.cc (left): https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc#oldcode133 components/ssl_errors/error_classification.cc:133: } else if (IsUserClockInTheFuture(base::Time::NowFromSystemTime())) { On 2016/03/10 20:10:08, estark ...
4 years, 9 months ago (2016-03-11 04:18:42 UTC) #7
mab
https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc File components/ssl_errors/error_classification.cc (right): https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc#newcode134 components/ssl_errors/error_classification.cc:134: RecordSSLInterstitialCause(overridable, CLOCK_PAST); Oh, I should add: if you buy ...
4 years, 9 months ago (2016-03-11 21:07:15 UTC) #8
estark
If you don't mind, I'm just going to add felt@ to this to weigh in ...
4 years, 9 months ago (2016-03-11 22:00:06 UTC) #9
estark
felt: Matt's modifying the bad clock interstitial code to use network time when available, and ...
4 years, 9 months ago (2016-03-11 22:08:23 UTC) #11
estark
https://codereview.chromium.org/1772143002/diff/60001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/60001/chrome/browser/ssl/ssl_error_handler.cc#newcode149 chrome/browser/ssl/ssl_error_handler.cc:149: switch (ssl_errors::GetClockState( mab: another question, unrelated to the metrics ...
4 years, 9 months ago (2016-03-11 22:14:58 UTC) #12
mab
https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc File components/ssl_errors/error_classification.cc (right): https://codereview.chromium.org/1772143002/diff/20001/components/ssl_errors/error_classification.cc#newcode134 components/ssl_errors/error_classification.cc:134: RecordSSLInterstitialCause(overridable, CLOCK_PAST); Updated histograms.xml. I've kept the enum, because ...
4 years, 9 months ago (2016-03-11 23:12:50 UTC) #13
estark
https://codereview.chromium.org/1772143002/diff/60001/components/ssl_errors/error_classification.cc File components/ssl_errors/error_classification.cc (right): https://codereview.chromium.org/1772143002/diff/60001/components/ssl_errors/error_classification.cc#newcode133 components/ssl_errors/error_classification.cc:133: // TODO(mab): Why doesn't this just use |current_time|? On ...
4 years, 9 months ago (2016-03-11 23:15:23 UTC) #14
felt
https://codereview.chromium.org/1772143002/diff/80001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/80001/chrome/browser/ssl/ssl_error_handler.cc#newcode151 chrome/browser/ssl/ssl_error_handler.cc:151: case ssl_errors::CLOCK_STATE_FUTURE: can you add a comment to say ...
4 years, 9 months ago (2016-03-11 23:23:45 UTC) #15
felt
On 2016/03/11 22:08:23, estark wrote: > felt: Matt's modifying the bad clock interstitial code to ...
4 years, 9 months ago (2016-03-11 23:29:08 UTC) #16
felt
4 years, 9 months ago (2016-03-11 23:29:15 UTC) #17
mab
https://codereview.chromium.org/1772143002/diff/80001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/80001/chrome/browser/ssl/ssl_error_handler.cc#newcode151 chrome/browser/ssl/ssl_error_handler.cc:151: case ssl_errors::CLOCK_STATE_FUTURE: I'll just make it return. https://codereview.chromium.org/1772143002/diff/80001/components/ssl_errors/error_classification.cc File ...
4 years, 9 months ago (2016-03-11 23:34:20 UTC) #18
mab
Agree it would be nice to have this number, but measurement by eye is probably ...
4 years, 9 months ago (2016-03-11 23:41:00 UTC) #19
felt
On 2016/03/11 23:41:00, mab wrote: > Agree it would be nice to have this number, ...
4 years, 9 months ago (2016-03-11 23:51:15 UTC) #20
mab
Ah, if it is OK to record metrics from GetClockState, this does indeed get a ...
4 years, 9 months ago (2016-03-11 23:59:06 UTC) #21
estark
On 2016/03/11 23:59:06, mab wrote: > Ah, if it is OK to record metrics from ...
4 years, 9 months ago (2016-03-12 00:04:43 UTC) #22
mab
I don't want to leak implementation details, so I've just added a flag to |GetClockState| ...
4 years, 9 months ago (2016-03-12 04:55:38 UTC) #23
estark
https://codereview.chromium.org/1772143002/diff/120001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/120001/chrome/browser/ssl/ssl_error_handler.cc#newcode151 chrome/browser/ssl/ssl_error_handler.cc:151: true /* record statistics */)) { Sorry, I promise ...
4 years, 9 months ago (2016-03-12 07:54:53 UTC) #24
mab
https://codereview.chromium.org/1772143002/diff/120001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/120001/chrome/browser/ssl/ssl_error_handler.cc#newcode151 chrome/browser/ssl/ssl_error_handler.cc:151: true /* record statistics */)) { Not at all; ...
4 years, 9 months ago (2016-03-14 21:25:25 UTC) #25
estark
https://codereview.chromium.org/1772143002/diff/120001/chrome/browser/ssl/ssl_error_handler.cc File chrome/browser/ssl/ssl_error_handler.cc (right): https://codereview.chromium.org/1772143002/diff/120001/chrome/browser/ssl/ssl_error_handler.cc#newcode151 chrome/browser/ssl/ssl_error_handler.cc:151: true /* record statistics */)) { On 2016/03/14 21:25:25, ...
4 years, 9 months ago (2016-03-15 05:50:00 UTC) #26
mab
Yep. Done.
4 years, 9 months ago (2016-03-15 19:17:50 UTC) #27
mab
+asvitkine for histograms.xml +jochen for components/BUILD.gn and chrome/browser/ui/webui/interstitials/interstitial_ui.cc
4 years, 9 months ago (2016-03-15 21:39:24 UTC) #30
estark
lgtm with a couple nits inline, also can you please update CL description to add ...
4 years, 9 months ago (2016-03-16 00:51:37 UTC) #31
Alexei Svitkine (slow)
lgtm
4 years, 9 months ago (2016-03-16 17:32:37 UTC) #33
mab
Updated change description. https://codereview.chromium.org/1772143002/diff/180001/chrome/browser/ssl/bad_clock_blocking_page.cc File chrome/browser/ssl/bad_clock_blocking_page.cc (right): https://codereview.chromium.org/1772143002/diff/180001/chrome/browser/ssl/bad_clock_blocking_page.cc#newcode22 chrome/browser/ssl/bad_clock_blocking_page.cc:22: #include "components/ssl_errors/error_classification.h" On 2016/03/16 00:51:36, estark ...
4 years, 9 months ago (2016-03-17 00:38:09 UTC) #34
mab
Trying to make reviewers more sane ... dbeam can you please review chrome/browser/ui/webui/interstitials/interstitial_ui.cc? caitkp can ...
4 years, 9 months ago (2016-03-17 17:39:28 UTC) #39
Cait (Slow)
lgtm
4 years, 9 months ago (2016-03-17 17:42:39 UTC) #40
Dan Beam
lgtm
4 years, 9 months ago (2016-03-17 19:23:57 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772143002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772143002/200001
4 years, 9 months ago (2016-03-17 20:53:47 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/131452)
4 years, 9 months ago (2016-03-17 21:27:04 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772143002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772143002/220001
4 years, 9 months ago (2016-03-17 22:35:44 UTC) #49
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 9 months ago (2016-03-17 23:44:32 UTC) #51
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 23:45:55 UTC) #53
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/740b02b74735910ec8e185d6375d4eda3f15e0ba
Cr-Commit-Position: refs/heads/master@{#381837}

Powered by Google App Engine
This is Rietveld 408576698