| Index: content/browser/media/audio_stream_monitor.h
|
| diff --git a/content/browser/media/audio_stream_monitor.h b/content/browser/media/audio_stream_monitor.h
|
| index d1a32d5f857b05925f884ef64d834e673c8c5f29..149dd3e2371a8942b01685e5c15fa970ef9b18d6 100644
|
| --- a/content/browser/media/audio_stream_monitor.h
|
| +++ b/content/browser/media/audio_stream_monitor.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/callback_forward.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "base/time/default_tick_clock.h"
|
| +#include "base/time/tick_clock.h"
|
| #include "base/time/time.h"
|
| #include "base/timer/timer.h"
|
| #include "build/build_config.h"
|
| @@ -112,15 +113,17 @@ class CONTENT_EXPORT AudioStreamMonitor {
|
| // on, |off_timer_| is started to re-invoke this method in the future.
|
| void MaybeToggle();
|
|
|
| + void set_clock_for_testing(const scoped_refptr<base::TickClock>& clock) {
|
| + clock_ = clock;
|
| + }
|
| +
|
| // The WebContents instance instance to receive indicator toggle
|
| // notifications. This pointer should be valid for the lifetime of
|
| // AudioStreamMonitor.
|
| WebContents* const web_contents_;
|
|
|
| - // Note: |clock_| is always |&default_tick_clock_|, except during unit
|
| - // testing.
|
| - base::DefaultTickClock default_tick_clock_;
|
| - base::TickClock* const clock_;
|
| + // Note: |clock_| is always a DefaultTickClock(), except during unit testing.
|
| + scoped_refptr<base::TickClock> clock_;
|
|
|
| // Confirms single-threaded access in debug builds.
|
| base::ThreadChecker thread_checker_;
|
|
|