| Index: components/copresence/handlers/directive_handler_unittest.cc
|
| diff --git a/components/copresence/handlers/directive_handler_unittest.cc b/components/copresence/handlers/directive_handler_unittest.cc
|
| index f65b9cf641358bd225a12b4f864750db1770a116..72e44104133e489ec1c8a61f883e8aac0281536f 100644
|
| --- a/components/copresence/handlers/directive_handler_unittest.cc
|
| +++ b/components/copresence/handlers/directive_handler_unittest.cc
|
| @@ -2,10 +2,6 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include <string>
|
| -#include <vector>
|
| -
|
| -#include "base/bind.h"
|
| #include "base/time/time.h"
|
| #include "components/copresence/handlers/audio/audio_directive_handler.h"
|
| #include "components/copresence/handlers/directive_handler_impl.h"
|
| @@ -26,12 +22,10 @@
|
|
|
| namespace copresence {
|
|
|
| -void IgnoreDirectiveUpdates(const std::vector<Directive>& /* directives */) {}
|
| -
|
| -const Directive CreateDirective(const std::string& publish_id,
|
| - const std::string& subscribe_id,
|
| - const std::string& token,
|
| - int64 ttl_ms) {
|
| +Directive CreateDirective(const std::string& publish_id,
|
| + const std::string& subscribe_id,
|
| + const std::string& token,
|
| + int64 ttl_ms) {
|
| Directive directive;
|
| directive.set_instruction_type(TOKEN);
|
| directive.set_published_message_id(publish_id);
|
| @@ -46,9 +40,9 @@
|
| return directive;
|
| }
|
|
|
| -const Directive CreateDirective(const std::string& publish_id,
|
| - const std::string& subscribe_id,
|
| - const std::string& token) {
|
| +Directive CreateDirective(const std::string& publish_id,
|
| + const std::string& subscribe_id,
|
| + const std::string& token) {
|
| return CreateDirective(publish_id, subscribe_id, token, kDefaultTtl);
|
| }
|
|
|
| @@ -59,10 +53,11 @@
|
| void Initialize(WhispernetClient* /* whispernet_client */,
|
| const TokensCallback& /* tokens_cb */) override {}
|
|
|
| - void AddInstruction(const Directive& directive,
|
| - const std::string& /* op_id */) override {
|
| - added_tokens_.push_back(directive.token_instruction().token_id());
|
| - added_ttls_.push_back(directive.ttl_millis());
|
| + void AddInstruction(const TokenInstruction& instruction,
|
| + const std::string& /* op_id */,
|
| + base::TimeDelta ttl) override {
|
| + added_tokens_.push_back(instruction.token_id());
|
| + added_ttls_.push_back(ttl.InMilliseconds());
|
| }
|
|
|
| void RemoveInstructions(const std::string& op_id) override {
|
| @@ -103,7 +98,6 @@
|
| : whispernet_client_(new StubWhispernetClient),
|
| audio_handler_(new FakeAudioDirectiveHandler),
|
| directive_handler_(
|
| - base::Bind(&IgnoreDirectiveUpdates),
|
| make_scoped_ptr<AudioDirectiveHandler>(audio_handler_)) {}
|
|
|
| protected:
|
|
|