Chromium Code Reviews| Index: ui/events/event_utils.cc |
| diff --git a/ui/events/event_utils.cc b/ui/events/event_utils.cc |
| index 2e34a82477e0ed6a591b0e325c4a7d1dd34a4a71..4d5ef592b78ef8c89aa3ae998b98ec62f7c0f795 100644 |
| --- a/ui/events/event_utils.cc |
| +++ b/ui/events/event_utils.cc |
| @@ -62,26 +62,21 @@ int RegisterCustomEventType() { |
| } |
| void ValidateEventTimeClock(base::TimeTicks* timestamp) { |
| -// Restrict this validation to DCHECK builds except when using X11 which is |
| -// known to provide bogus timestamps that require correction (crbug.com/611950). |
| -#if defined(USE_X11) || DCHECK_IS_ON() |
| if (base::debug::BeingDebugged()) |
| return; |
| base::TimeTicks now = EventTimeForNow(); |
| int64_t delta = (now - *timestamp).InMilliseconds(); |
|
Ilya Sherman
2016/09/26 19:04:44
nit: Please write this as
bool has_valid_timebase
majidvp
2016/10/11 16:02:07
Done.
|
| if (delta < 0 || delta > 60 * 1000) { |
| - UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase", false); |
| + UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase.Browser", false); |
|
Ilya Sherman
2016/09/26 19:04:44
Where is the .Renderer version of this histogram?
majidvp
2016/10/11 16:02:07
It is more involved so I am working on adding it i
Ilya Sherman
2016/10/11 23:54:08
In general, it's best to modify histograms.xml in
majidvp
2016/10/12 13:44:21
I thought it will be odd to have a histogram_suffi
Ilya Sherman
2016/10/13 00:40:17
It's acceptable, yeah. It's not a big deal either
|
| #if defined(USE_X11) |
| + // Restrict this correction to X11 which is known to provide bogus |
| + // timestamps that require correction (crbug.com/611950). |
| *timestamp = now; |
| -#else |
| - NOTREACHED() << "Unexpected event timestamp, now:" << now |
| - << " event timestamp:" << *timestamp; |
| #endif |
| + } else { |
| + UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase.Browser", true); |
| } |
| - |
| - UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase", true); |
| -#endif |
| } |
| bool ShouldDefaultToNaturalScroll() { |