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

Side by Side Diff: components/copresence/test/fake_directive_handler.h

Issue 712833002: Undoing revert, cl is not the cause of gcm crash on canary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
6 #define COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "components/copresence/handlers/directive_handler.h"
12
13 namespace copresence {
14
15 // TODO(ckehoe): Make DirectiveHandler an interface.
16 class FakeDirectiveHandler final : public DirectiveHandler {
17 public:
18 FakeDirectiveHandler();
19 ~FakeDirectiveHandler() override;
20
21 const std::vector<std::string>& added_directives() const {
22 return added_directives_;
23 }
24
25 const std::vector<std::string>& removed_directives() const {
26 return removed_directives_;
27 }
28
29 void Start(WhispernetClient* /* whispernet_client */,
30 const TokensCallback& /* tokens_cb */) override {}
31
32 void AddDirective(const Directive& directive) override;
33
34 void RemoveDirectives(const std::string& op_id) override;
35
36 const std::string GetCurrentAudioToken(AudioType type) const override;
37
38 bool IsAudioTokenHeard(AudioType type) const override;
39
40 private:
41 std::vector<std::string> added_directives_;
42 std::vector<std::string> removed_directives_;
43
44 DISALLOW_COPY_AND_ASSIGN(FakeDirectiveHandler);
45 };
46
47 } // namespace copresence
48
49 #endif // COMPONENTS_COPRESENCE_TEST_FAKE_DIRECTIVE_HANDLER_H_
OLDNEW
« no previous file with comments | « components/copresence/rpc/rpc_handler_unittest.cc ('k') | components/copresence/test/fake_directive_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698