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

Unified Diff: components/audio_modem/test/stub_modem.cc

Issue 2131993002: Delete the audio modem and copresence private APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eol
Patch Set: Sync again Created 4 years, 5 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
« no previous file with comments | « components/audio_modem/test/stub_modem.h ('k') | components/audio_modem/test/stub_whispernet_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/audio_modem/test/stub_modem.cc
diff --git a/components/audio_modem/test/stub_modem.cc b/components/audio_modem/test/stub_modem.cc
deleted file mode 100644
index ea0fb0882e86a644af29b82317310d0a14abf28f..0000000000000000000000000000000000000000
--- a/components/audio_modem/test/stub_modem.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/audio_modem/test/stub_modem.h"
-
-#include "base/base64.h"
-#include "base/logging.h"
-
-namespace audio_modem {
-
-StubModem::StubModem() {
- playing_[AUDIBLE] = false;
- playing_[INAUDIBLE] = false;
- recording_[AUDIBLE] = false;
- recording_[INAUDIBLE] = false;
-}
-
-StubModem::~StubModem() {}
-
-void StubModem::Initialize(WhispernetClient* whispernet_client,
- const TokensCallback& tokens_cb) {
- tokens_callback_ = tokens_cb;
-}
-
-void StubModem::StartPlaying(AudioType type) {
- playing_[type] = true;
-}
-
-void StubModem::StopPlaying(AudioType type) {
- playing_[type] = false;
-}
-
-void StubModem::StartRecording(AudioType type) {
- recording_[type] = true;
-}
-
-void StubModem::StopRecording(AudioType type) {
- recording_[type] = false;
-}
-
-const std::string StubModem::GetToken(AudioType type) const {
- return std::string();
-}
-
-bool StubModem::IsPlayingTokenHeard(AudioType type) const {
- return false;
-}
-
-bool StubModem::IsRecording(AudioType type) const {
- return recording_[type];
-}
-
-bool StubModem::IsPlaying(AudioType type) const {
- return playing_[type];
-}
-
-void StubModem::DeliverTokens(const std::vector<AudioToken>& tokens) {
- std::vector<AudioToken> encoded_tokens;
- for (const AudioToken& token : tokens) {
- std::string encoded_token;
- base::Base64Encode(token.token, & encoded_token);
- encoded_tokens.push_back(AudioToken(encoded_token, token.audible));
- }
- DCHECK_EQ(tokens.size(), encoded_tokens.size());
- tokens_callback_.Run(encoded_tokens);
-}
-
-} // namespace audio_modem
« no previous file with comments | « components/audio_modem/test/stub_modem.h ('k') | components/audio_modem/test/stub_whispernet_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698