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

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
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() {}

Powered by Google App Engine
This is Rietveld 408576698