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

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

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_list.h
diff --git a/components/copresence/handlers/audio/audio_directive_list.h b/components/copresence/handlers/audio/audio_directive_list.h
index 4934ac1e93f19dd574c49b7e3401fa1046bc7992..027d54d3dc2fe08120282cae91d7c28c7b5806c3 100644
--- a/components/copresence/handlers/audio/audio_directive_list.h
+++ b/components/copresence/handlers/audio/audio_directive_list.h
@@ -10,6 +10,7 @@
#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"
@@ -48,6 +49,8 @@ class AudioDirectiveList {
scoped_ptr<AudioDirective> GetActiveDirective();
+ void set_clock_for_testing(const scoped_refptr<base::TickClock>& clock);
+
private:
// Comparator for comparing end_times on audio tokens.
class LatestFirstComparator {
@@ -66,7 +69,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<base::TickClock> clock_;
DISALLOW_COPY_AND_ASSIGN(AudioDirectiveList);
};

Powered by Google App Engine
This is Rietveld 408576698