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

Unified Diff: content/browser/speech/speech_recognizer_unittest.cc

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Set svn eol properties for a couple of files Created 9 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
« no previous file with comments | « content/browser/speech/speech_recognizer.cc ('k') | content/renderer/media/webrtc_audio_device_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognizer_unittest.cc
===================================================================
--- content/browser/speech/speech_recognizer_unittest.cc (revision 114012)
+++ content/browser/speech/speech_recognizer_unittest.cc (working copy)
@@ -7,6 +7,7 @@
#include "content/browser/browser_thread_impl.h"
#include "content/browser/speech/speech_recognizer.h"
#include "content/test/test_url_fetcher_factory.h"
+#include "media/audio/audio_manager.h"
#include "media/audio/test_audio_input_controller_factory.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request_status.h"
@@ -25,16 +26,16 @@
public:
SpeechRecognizerTest()
: io_thread_(BrowserThread::IO, &message_loop_),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- recognizer_(new SpeechRecognizer(this, 1, std::string(),
- std::string(), NULL, false,
- std::string(), std::string()))),
+ audio_manager_(AudioManager::Create()),
recording_complete_(false),
recognition_complete_(false),
result_received_(false),
audio_received_(false),
error_(content::SPEECH_INPUT_ERROR_NONE),
volume_(-1.0f) {
+ recognizer_ = new SpeechRecognizer(this, 1, std::string(), std::string(),
+ NULL, audio_manager_, false,
+ std::string(), std::string());
int audio_packet_length_bytes =
(SpeechRecognizer::kAudioSampleRate *
SpeechRecognizer::kAudioPacketIntervalMs *
@@ -111,6 +112,7 @@
MessageLoopForIO message_loop_;
BrowserThreadImpl io_thread_;
scoped_refptr<SpeechRecognizer> recognizer_;
+ scoped_refptr<AudioManager> audio_manager_;
bool recording_complete_;
bool recognition_complete_;
bool result_received_;
« no previous file with comments | « content/browser/speech/speech_recognizer.cc ('k') | content/renderer/media/webrtc_audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698