Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.12 KB | None | 0 0
  1. diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc
  2. index 8dec888198a3..9409912d4a3c 100644
  3. --- a/ui/events/x/events_x_utils.cc
  4. +++ b/ui/events/x/events_x_utils.cc
  5. @@ -30,18 +30,20 @@ namespace {
  6.  ui::TimestampServer* g_timestamp_server = nullptr;
  7.  bool g_use_fixed_time_for_testing = false;
  8.  
  9. -// Clamps a TimeDelta to be within [-30 seconds, 30 seconds].
  10. +// Clamps a TimeDelta to be within [0 seconds, 60 seconds].
  11.  base::TimeDelta ClampDeltaFromExternalSource(const base::TimeDelta& delta) {
  12.    // Ignore pathologically long deltas. External source is probably having
  13.    // issues.
  14.    constexpr base::TimeDelta pathologically_long_duration =
  15. -      base::TimeDelta::FromSeconds(30);
  16. +      base::TimeDelta::FromSeconds(60);
  17.    if (delta > pathologically_long_duration)
  18.      return base::TimeDelta();
  19.  
  20.    // Ignore negative deltas. External source is probably having issues.
  21. -  if (delta < -pathologically_long_duration)
  22. +  if (delta < base::TimeDelta())
  23.      return base::TimeDelta();
  24. +  // if (delta < -pathologically_long_duration)
  25. +  //   return base::TimeDelta();
  26.  
  27.    return delta;
  28.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement