Index: components/copresence/handlers/audio/tick_clock_ref_counted.h |
diff --git a/components/copresence/handlers/audio/tick_clock_ref_counted.h b/components/copresence/handlers/audio/tick_clock_ref_counted.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5bece752faaff08ae7b0fed869a312c80153b318 |
--- /dev/null |
+++ b/components/copresence/handlers/audio/tick_clock_ref_counted.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ |
+#define COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/time/time.h" |
+ |
+namespace base { |
+class TickClock; |
+} |
+ |
+namespace copresence { |
+ |
+class TickClockRefCounted |
+ : public base::RefCountedThreadSafe<TickClockRefCounted> { |
+ public: |
+ explicit TickClockRefCounted(scoped_ptr<base::TickClock> clock); |
+ base::TimeTicks NowTicks(); |
+ |
+ private: |
+ friend class base::RefCountedThreadSafe<TickClockRefCounted>; |
+ virtual ~TickClockRefCounted(); |
+ |
+ scoped_ptr<base::TickClock> clock_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TickClockRefCounted); |
+}; |
+ |
+} // namespace copresence |
+ |
+#endif // COMPONENTS_COPRESENCE_HANDLERS_AUDIO_TICK_CLOCK_REF_COUNTED_H_ |