| OLD | NEW |
| (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_ |
| OLD | NEW |