| 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 #include "components/copresence/handlers/audio/tick_clock_ref_counted.h" | 5 #include "components/copresence/handlers/audio/tick_clock_ref_counted.h" |
| 6 | 6 |
| 7 #include "base/time/tick_clock.h" | 7 #include "base/time/tick_clock.h" |
| 8 | 8 |
| 9 namespace copresence { | 9 namespace copresence { |
| 10 | 10 |
| 11 TickClockRefCounted::TickClockRefCounted(scoped_ptr<base::TickClock> clock) | 11 TickClockRefCounted::TickClockRefCounted(scoped_ptr<base::TickClock> clock) |
| 12 : clock_(clock.Pass()) { | 12 : clock_(clock.Pass()) {} |
| 13 } | |
| 14 | 13 |
| 15 base::TimeTicks TickClockRefCounted::NowTicks() { | 14 TickClockRefCounted::TickClockRefCounted(base::TickClock* clock) |
| 15 : clock_(make_scoped_ptr(clock)) {} |
| 16 |
| 17 base::TimeTicks TickClockRefCounted::NowTicks() const { |
| 16 return clock_->NowTicks(); | 18 return clock_->NowTicks(); |
| 17 } | 19 } |
| 18 | 20 |
| 19 TickClockRefCounted::~TickClockRefCounted() { | 21 TickClockRefCounted::~TickClockRefCounted() {} |
| 20 } | |
| 21 | 22 |
| 22 } // namespace copresence | 23 } // namespace copresence |
| OLD | NEW |