Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLOCK_H_ | |
|
Mathieu
2017/01/25 22:32:14
fix
sebsg
2017/01/30 20:27:26
Done.
| |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLOCK_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/gtest_prod_util.h" | |
|
Mathieu
2017/01/25 22:32:14
need?
sebsg
2017/01/30 20:27:26
Done.
| |
| 11 #include "base/lazy_instance.h" | |
|
Mathieu
2017/01/25 22:32:14
move to cc?
sebsg
2017/01/30 20:27:26
Done.
| |
| 12 #include "base/macros.h" | |
| 13 | |
| 14 namespace base { | |
| 15 class Clock; | |
| 16 class Time; | |
| 17 } // namespace base | |
| 18 | |
| 19 namespace autofill { | |
| 20 | |
| 21 class AutofillClock { | |
|
Mathieu
2017/01/25 22:32:14
Please add at least a class comment
sebsg
2017/01/30 20:27:26
Done.
| |
| 22 public: | |
| 23 static base::Time Now(); | |
| 24 | |
| 25 AutofillClock(); | |
|
Mathieu
2017/01/25 22:32:14
nit: I think I would put ctor and dtor before the
sebsg
2017/01/30 20:27:26
Done.
| |
| 26 ~AutofillClock(); | |
| 27 | |
| 28 private: | |
| 29 friend class PersonalDataManagerTest; | |
| 30 | |
| 31 static void SetClockForTests(std::unique_ptr<base::Clock> clock); | |
| 32 | |
| 33 std::unique_ptr<base::Clock> clock_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(AutofillClock); | |
| 36 }; | |
| 37 | |
| 38 } // namespace autofill | |
| 39 | |
| 40 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLOCK_H_ | |
| OLD | NEW |