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

Unified Diff: components/copresence/handlers/audio/audio_directive_handler.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_handler.h
diff --git a/components/copresence/handlers/audio/audio_directive_handler.h b/components/copresence/handlers/audio/audio_directive_handler.h
index 510cf6e388ef8f296c8f77e0e02b81104f19a5cb..b7a47f9718727d8c6d0518ddcd5a9f6072e9b10e 100644
--- a/components/copresence/handlers/audio/audio_directive_handler.h
+++ b/components/copresence/handlers/audio/audio_directive_handler.h
@@ -17,7 +17,6 @@
#include "components/copresence/proto/data.pb.h"
namespace base {
-class TickClock;
class Timer;
}
@@ -27,6 +26,8 @@ class AudioBusRefCounted;
namespace copresence {
+class TickClockRefCounted;
+
// The AudioDirectiveHandler handles audio transmit and receive instructions.
// TODO(rkc): Currently since WhispernetClient can only have one token encoded
// callback at a time, we need to have both the audible and inaudible in this
@@ -61,6 +62,9 @@ class AudioDirectiveHandler final {
audio_manager_ = manager.Pass();
}
+ void set_clock_for_testing(const scoped_refptr<TickClockRefCounted>& clock);
+ void set_timer_for_testing(scoped_ptr<base::Timer> timer);
+
private:
// Processes the next active instruction, updating our audio manager state
// accordingly.
@@ -77,7 +81,7 @@ class AudioDirectiveHandler final {
scoped_ptr<base::Timer> audio_event_timer_;
- scoped_ptr<base::TickClock> clock_;
+ scoped_refptr<TickClockRefCounted> clock_;
DISALLOW_COPY_AND_ASSIGN(AudioDirectiveHandler);
};

Powered by Google App Engine
This is Rietveld 408576698