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

Side by Side Diff: components/autofill/core/common/autofill_clock.h

Issue 2639403002: [Autofill] Remove direct use of base::Time::Now() in Autofill (Closed)
Patch Set: Addressed comments Created 3 years, 10 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 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698