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

Unified Diff: chrome/common/net/test_url_fetcher_factory.cc

Issue 6615020: Stream speech audio to server as it gets recorded, instead of waiting until end of recording. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 10 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 | « chrome/common/net/test_url_fetcher_factory.h ('k') | content/browser/speech/audio_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/test_url_fetcher_factory.cc
diff --git a/chrome/common/net/test_url_fetcher_factory.cc b/chrome/common/net/test_url_fetcher_factory.cc
index 869e9be5bbb06ac1c39f4d1b2b486043a40a48b1..88f62d9ec7dc12821f738b7ccb637b14973f3c34 100644
--- a/chrome/common/net/test_url_fetcher_factory.cc
+++ b/chrome/common/net/test_url_fetcher_factory.cc
@@ -16,7 +16,15 @@ TestURLFetcher::TestURLFetcher(int id,
URLFetcher::Delegate* d)
: URLFetcher(url, request_type, d),
id_(id),
- original_url_(url) {
+ original_url_(url),
+ did_receive_last_chunk_(false) {
+}
+
+void TestURLFetcher::AppendChunkToUpload(const std::string& data,
+ bool is_last_chunk) {
+ DCHECK(!did_receive_last_chunk_);
+ did_receive_last_chunk_ = is_last_chunk;
+ chunks_.push_back(data);
}
TestURLFetcherFactory::TestURLFetcherFactory() {}
« no previous file with comments | « chrome/common/net/test_url_fetcher_factory.h ('k') | content/browser/speech/audio_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698