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

Unified Diff: components/ssl_errors/error_classification.cc

Issue 2421143002: Fix broken clockstate.network2 histogram and add unit test (Closed)
Patch Set: meacer suggestion: move field trial into test util Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/ssl_errors/error_classification.cc
diff --git a/components/ssl_errors/error_classification.cc b/components/ssl_errors/error_classification.cc
index 66aa42d215c635262aad35df4336b9197c3ab3aa..c61b3262aca91ceeb9df8e5f83ba5a1fa6e209a4 100644
--- a/components/ssl_errors/error_classification.cc
+++ b/components/ssl_errors/error_classification.cc
@@ -38,39 +38,6 @@ using base::TimeDelta;
namespace ssl_errors {
namespace {
-// Describes the result of getting network time and if it was
-// unavailable, why it was unavailable. This enum is being histogrammed
-// so do not reorder or remove values.
-enum NetworkClockState {
- // Value 0 was NETWORK_CLOCK_STATE_UNKNOWN_NO_SYNC, which is obsolete
- // in favor of the finer-grained values below.
-
- // The clock state relative to network time is unknown because the
- // user's clock has fallen out of sync with the latest information
- // from the network (due to e.g. suspend/resume).
- NETWORK_CLOCK_STATE_UNKNOWN_SYNC_LOST = 1,
- // The clock is "close enough" to the network time.
- NETWORK_CLOCK_STATE_OK,
- // The clock is in the past relative to network time.
- NETWORK_CLOCK_STATE_CLOCK_IN_PAST,
- // The clock is in the future relative to network time.
- NETWORK_CLOCK_STATE_CLOCK_IN_FUTURE,
- // The clock state relative to network time is unknown because no sync
- // attempt has been made yet.
- NETWORK_CLOCK_STATE_UNKNOWN_NO_SYNC_ATTEMPT,
- // The clock state relative to network time is unknown because one or
- // more sync attempts has failed.
- NETWORK_CLOCK_STATE_UNKNOWN_NO_SUCCESSFUL_SYNC,
- // The clock state relative to network time is unknown because the
- // first sync attempt is still pending.
- NETWORK_CLOCK_STATE_UNKNOWN_FIRST_SYNC_PENDING,
- // The clock state relative to network time is unknown because one or
- // more time query attempts have failed, and a subsequent sync attempt
- // is still pending.
- NETWORK_CLOCK_STATE_UNKNOWN_SUBSEQUENT_SYNC_PENDING,
- NETWORK_CLOCK_STATE_MAX
-};
-
// Events for UMA. Do not reorder or change!
enum SSLInterstitialCause {
CLOCK_PAST,
@@ -280,8 +247,8 @@ ClockState GetClockState(
build_time_state = CLOCK_STATE_FUTURE;
}
- UMA_HISTOGRAM_ENUMERATION("interstitial.ssl.clockstate.network2",
- network_time_result, NETWORK_CLOCK_STATE_MAX);
+ UMA_HISTOGRAM_ENUMERATION("interstitial.ssl.clockstate.network3",
+ network_state, NETWORK_CLOCK_STATE_MAX);
UMA_HISTOGRAM_ENUMERATION("interstitial.ssl.clockstate.build_time",
build_time_state, CLOCK_STATE_MAX);
« no previous file with comments | « components/ssl_errors/error_classification.h ('k') | components/ssl_errors/error_classification_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698