| Index: ui/events/event_utils.cc
|
| diff --git a/ui/events/event_utils.cc b/ui/events/event_utils.cc
|
| index 2e34a82477e0ed6a591b0e325c4a7d1dd34a4a71..f60daf6d991a24ba55a61c24d5d27d9535946d2b 100644
|
| --- a/ui/events/event_utils.cc
|
| +++ b/ui/events/event_utils.cc
|
| @@ -62,25 +62,20 @@ 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();
|
| - if (delta < 0 || delta > 60 * 1000) {
|
| - UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase", false);
|
| + bool has_valid_timebase = delta >= 0 && delta <= 60 * 1000;
|
| + UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase.Browser",
|
| + has_valid_timebase);
|
| +
|
| #if defined(USE_X11)
|
| + // Restrict this correction to X11 which is known to provide bogus timestamps
|
| + // that require correction (crbug.com/611950).
|
| + if (!has_valid_timebase)
|
| *timestamp = now;
|
| -#else
|
| - NOTREACHED() << "Unexpected event timestamp, now:" << now
|
| - << " event timestamp:" << *timestamp;
|
| -#endif
|
| - }
|
| -
|
| - UMA_HISTOGRAM_BOOLEAN("Event.TimestampHasValidTimebase", true);
|
| #endif
|
| }
|
|
|
|
|