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

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

Issue 665353002: Add AudioDirectiveHandler timed tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: 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/audio_directive_list.h
diff --git a/components/copresence/handlers/audio/audio_directive_list.h b/components/copresence/handlers/audio/audio_directive_list.h
index 4934ac1e93f19dd574c49b7e3401fa1046bc7992..80a6b725bbb8adbef30733a70da21a928ad5ed60 100644
--- a/components/copresence/handlers/audio/audio_directive_list.h
+++ b/components/copresence/handlers/audio/audio_directive_list.h
@@ -10,19 +10,18 @@
#include "base/callback.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 media {
class AudioBusRefCounted;
}
namespace copresence {
+class TickClockRefCounted;
+
struct AudioDirective final {
// Default ctor, required by the priority queue.
AudioDirective();
@@ -48,6 +47,8 @@ class AudioDirectiveList {
scoped_ptr<AudioDirective> GetActiveDirective();
+ void set_clock_for_testing(const scoped_refptr<TickClockRefCounted>& clock);
+
private:
// Comparator for comparing end_times on audio tokens.
class LatestFirstComparator {
@@ -66,7 +67,7 @@ class AudioDirectiveList {
// element. Only currently active directives will exist in this list.
std::vector<AudioDirective> active_directives_;
- scoped_ptr<base::TickClock> clock_;
+ scoped_refptr<TickClockRefCounted> clock_;
DISALLOW_COPY_AND_ASSIGN(AudioDirectiveList);
};

Powered by Google App Engine
This is Rietveld 408576698