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

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

Issue 9861019: Speech refactoring: Turned AudioChunk into a refcounted class (CL1.4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
Index: content/browser/speech/google_one_shot_remote_engine_unittest.cc
diff --git a/content/browser/speech/google_one_shot_remote_engine_unittest.cc b/content/browser/speech/google_one_shot_remote_engine_unittest.cc
index fab2b5f5f1a20f86380724c2ae061886091b7fa7..6a018e93f005272715107021ab04c90fcef82c11 100644
--- a/content/browser/speech/google_one_shot_remote_engine_unittest.cc
+++ b/content/browser/speech/google_one_shot_remote_engine_unittest.cc
@@ -48,12 +48,13 @@ void GoogleOneShotRemoteEngineTest::CreateAndTestRequest(
bool success, const std::string& http_response) {
GoogleOneShotRemoteEngine client(NULL);
unsigned char dummy_audio_buffer_data[2] = {'\0', '\0'};
- AudioChunk dummy_audio_chunk(&dummy_audio_buffer_data[0],
- sizeof(dummy_audio_buffer_data),
- 2 /* bytes per sample */);
+ scoped_refptr<AudioChunk> dummy_audio_chunk(
+ new AudioChunk(&dummy_audio_buffer_data[0],
+ sizeof(dummy_audio_buffer_data),
+ 2 /* bytes per sample */));
client.set_delegate(this);
client.StartRecognition();
- client.TakeAudioChunk(dummy_audio_chunk);
+ client.TakeAudioChunk(*dummy_audio_chunk);
hans 2012/03/27 15:56:31 hmm, i'm trying to think whether passing the Audio
Primiano Tucci (use gerrit) 2012/03/27 16:51:24 I kept the const ref for all those methods that do
client.AudioChunksEnded();
TestURLFetcher* fetcher = url_fetcher_factory_.GetFetcherByID(0);
ASSERT_TRUE(fetcher);

Powered by Google App Engine
This is Rietveld 408576698