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

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

Issue 824593003: Revert of Adding CopresenceState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 ccea27260ab91a7bba93b9c1a4cfead4762340f6..c0b170b60dae07eda85a785af9feabf9a7253368 100644
--- a/components/copresence/handlers/audio/audio_directive_list.h
+++ b/components/copresence/handlers/audio/audio_directive_list.h
@@ -14,7 +14,6 @@
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
#include "components/copresence/handlers/audio/tick_clock_ref_counted.h"
-#include "components/copresence/proto/data.pb.h"
namespace media {
class AudioBusRefCounted;
@@ -27,17 +26,12 @@
struct AudioDirective final {
// Default ctor, required by the priority queue.
AudioDirective();
- AudioDirective(const std::string& op_id,
- base::TimeTicks end_time,
- const Directive& server_directive);
+ AudioDirective(const std::string& op_id, base::TimeTicks end_time);
std::string op_id;
-
// We're currently using TimeTicks to track time. This may not work for cases
// where your machine suspends. See crbug.com/426136
base::TimeTicks end_time;
-
- Directive server_directive;
};
// This class maintains a list of active audio directives. It fetches the audio
@@ -46,18 +40,16 @@
// TODO(rkc): Once we implement more token technologies, move reusable code
// from here to a base class and inherit various XxxxDirectiveList
// classes from it.
-class AudioDirectiveList final {
+class AudioDirectiveList {
public:
explicit AudioDirectiveList(const scoped_refptr<TickClockRefCounted>& clock =
make_scoped_refptr(new TickClockRefCounted(new base::DefaultTickClock)));
~AudioDirectiveList();
- void AddDirective(const std::string& op_id, const Directive& directive);
+ void AddDirective(const std::string& op_id, base::TimeDelta ttl);
void RemoveDirective(const std::string& op_id);
scoped_ptr<AudioDirective> GetActiveDirective();
-
- const std::vector<AudioDirective>& directives() const;
private:
// Comparator for comparing end_times on audio tokens.

Powered by Google App Engine
This is Rietveld 408576698