| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ | 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ |
| 6 #define COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ | 6 #define COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(MockableTime); | 60 DISALLOW_COPY_AND_ASSIGN(MockableTime); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // Implementation of MockableTime that passes through to | 63 // Implementation of MockableTime that passes through to |
| 64 // base::Time{,Ticks}::Now() and base::Timer. | 64 // base::Time{,Ticks}::Now() and base::Timer. |
| 65 class DOMAIN_RELIABILITY_EXPORT ActualTime : public MockableTime { | 65 class DOMAIN_RELIABILITY_EXPORT ActualTime : public MockableTime { |
| 66 public: | 66 public: |
| 67 ActualTime(); | 67 ActualTime(); |
| 68 |
| 68 virtual ~ActualTime(); | 69 virtual ~ActualTime(); |
| 69 | 70 |
| 70 // MockableTime implementation: | 71 // MockableTime implementation: |
| 71 virtual base::Time Now() OVERRIDE; | 72 virtual base::Time Now() OVERRIDE; |
| 72 virtual base::TimeTicks NowTicks() OVERRIDE; | 73 virtual base::TimeTicks NowTicks() OVERRIDE; |
| 73 virtual scoped_ptr<MockableTime::Timer> CreateTimer() OVERRIDE; | 74 virtual scoped_ptr<MockableTime::Timer> CreateTimer() OVERRIDE; |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace domain_reliability | 77 } // namespace domain_reliability |
| 77 | 78 |
| 78 #endif // COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ | 79 #endif // COMPONENTS_DOMAIN_RELIABILITY_UTIL_H_ |
| OLD | NEW |