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

Side by Side Diff: ios/web/navigation/time_smoother.h

Issue 988383002: Upstream various ios/web utilities and helpers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-public-upstreaming
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_NAVIGATION_TIME_SMOOTHER_H_
6 #define IOS_WEB_NAVIGATION_TIME_SMOOTHER_H_
7
8 #include "base/time/time.h"
9
10 namespace web {
11
12 // Helper class to smooth out runs of duplicate timestamps while still
13 // allowing time to jump backwards.
14 //
15 // Duplicated from NavigationControllerImpl (until we have a better
16 // idea how to handle NavigationController implementation overlap
17 // in general).
18 class TimeSmoother {
19 public:
20 // Returns |t| with possibly some time added on.
21 base::Time GetSmoothedTime(base::Time t);
22
23 private:
24 // |low_water_mark_| is the first time in a sequence of adjusted
25 // times and |high_water_mark_| is the last.
26 base::Time low_water_mark_;
27 base::Time high_water_mark_;
28 };
29
30 } // namespace web
31
32 #endif // IOS_WEB_NAVIGATION_TIME_SMOOTHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698