OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ | |
6 #define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
xiyuan
2014/10/21 21:08:12
nit: both headers seems not used.
rkc
2014/10/22 00:16:57
Done.
| |
10 | |
11 #include "base/callback.h" | |
xiyuan
2014/10/21 21:08:12
nit: not used?
rkc
2014/10/22 00:16:57
Done.
| |
12 #include "base/macros.h" | |
13 #include "base/memory/ref_counted.h" | |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "base/time/time.h" | |
16 | |
17 namespace base { | |
18 class TickClock; | |
19 } | |
20 | |
21 namespace copresence { | |
22 | |
23 class BASE_EXPORT TickClockRefCounted | |
xiyuan
2014/10/21 21:08:12
Is BASE_EXPORT intentional here?
rkc
2014/10/22 00:16:57
Leftover from copying this code from base/timer :)
| |
24 : public base::RefCountedThreadSafe<TickClockRefCounted> { | |
25 public: | |
26 explicit TickClockRefCounted(base::TickClock* clock); | |
xiyuan
2014/10/21 21:08:12
nit: Document ownership or use scoped_ptr<>
rkc
2014/10/22 00:16:57
Makes the test code a bit uglier :)
Done.
| |
27 base::TimeTicks NowTicks(); | |
28 | |
29 private: | |
30 friend class RefCountedThreadSafe<TickClockRefCounted>; | |
31 virtual ~TickClockRefCounted(); | |
32 | |
33 scoped_ptr<base::TickClock> clock_; | |
34 }; | |
xiyuan
2014/10/21 21:08:12
nit: DISALLOW_COPY_AND_ASSIGN?
rkc
2014/10/22 00:16:57
Done.
| |
35 | |
36 } // namespace copresence | |
37 | |
38 #endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ | |
OLD | NEW |