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

Unified Diff: components/copresence/handlers/audio/tick_clock_ref_counted.h

Issue 665353002: Add AudioDirectiveHandler timed tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: build fix. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698