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

Unified Diff: components/copresence/handlers/audio/audio_directive_handler.cc

Issue 670623002: Change base::TickClock to a ref counted class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_redesign
Patch Set: y 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.cc
diff --git a/components/copresence/handlers/audio/audio_directive_handler.cc b/components/copresence/handlers/audio/audio_directive_handler.cc
index 2c91dddbbf98c3c0ef70e59bb70c95900ca37f5d..c52735631e049cc904f37407087acc45e5e6486c 100644
--- a/components/copresence/handlers/audio/audio_directive_handler.cc
+++ b/components/copresence/handlers/audio/audio_directive_handler.cc
@@ -100,11 +100,25 @@ void AudioDirectiveHandler::RemoveInstructions(const std::string& op_id) {
ProcessNextInstruction();
}
+void AudioDirectiveHandler::set_clock_for_testing(
+ const scoped_refptr<base::TickClock>& clock) {
+ clock_ = clock;
+
+ transmits_list_[AUDIBLE].set_clock_for_testing(clock);
+ transmits_list_[INAUDIBLE].set_clock_for_testing(clock);
+ receives_list_[AUDIBLE].set_clock_for_testing(clock);
+ receives_list_[INAUDIBLE].set_clock_for_testing(clock);
+}
+
+void AudioDirectiveHandler::set_timer_for_testing(
+ scoped_ptr<base::Timer> timer) {
+ audio_event_timer_.swap(timer);
+}
+
// Private methods.
void AudioDirectiveHandler::ProcessNextInstruction() {
DCHECK(audio_event_timer_);
- LOG(ERROR) << "RKC: Stopping the timer.";
audio_event_timer_->Stop();
// Change audio_manager_ state for audible transmits.

Powered by Google App Engine
This is Rietveld 408576698