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

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

Issue 637223011: Redesign the copresence audio handlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
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 9edd89f49b07c7ced741e44c62d9415989c555ee..4934ac1e93f19dd574c49b7e3401fa1046bc7992 100644
--- a/components/copresence/handlers/audio/audio_directive_list.h
+++ b/components/copresence/handlers/audio/audio_directive_list.h
@@ -13,19 +13,23 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
+namespace base {
+class TickClock;
+}
+
namespace media {
class AudioBusRefCounted;
}
namespace copresence {
-struct AudioDirective {
+struct AudioDirective final {
Daniel Erat 2014/10/22 16:34:35 nit: putting final on a struct seems unnecessary
rkc 2014/10/22 18:21:47 Done.
// Default ctor, required by the priority queue.
AudioDirective();
- AudioDirective(const std::string& op_id, base::Time end_time);
+ AudioDirective(const std::string& op_id, base::TimeTicks end_time);
std::string op_id;
- base::Time end_time;
+ base::TimeTicks end_time;
Daniel Erat 2014/10/22 16:34:35 while i pretty much always support the use of Time
rkc 2014/10/22 18:21:47 I read that in the documentation but don't think i
Daniel Erat 2014/10/22 18:32:40 i'm not aware of anything that returns ticks since
rkc 2014/10/22 19:28:46 So the posix implementation of Time::Now() returns
};
// This class maintains a list of active audio directives. It fetches the audio
@@ -37,7 +41,7 @@ struct AudioDirective {
class AudioDirectiveList {
public:
AudioDirectiveList();
- virtual ~AudioDirectiveList();
+ ~AudioDirectiveList();
void AddDirective(const std::string& op_id, base::TimeDelta ttl);
void RemoveDirective(const std::string& op_id);
@@ -62,6 +66,8 @@ class AudioDirectiveList {
// element. Only currently active directives will exist in this list.
std::vector<AudioDirective> active_directives_;
+ scoped_ptr<base::TickClock> clock_;
+
DISALLOW_COPY_AND_ASSIGN(AudioDirectiveList);
};

Powered by Google App Engine
This is Rietveld 408576698