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

Side by Side Diff: components/copresence/handlers/audio/tick_clock_ref_counted.cc

Issue 690213004: Refactoring AudioDirectiveHandler to support testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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
OLDNEW
« no previous file with comments | « components/copresence/handlers/audio/tick_clock_ref_counted.h ('k') | components/copresence/handlers/directive_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698