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

Unified Diff: content/browser/streams/stream.cc

Issue 15817013: Add Stream support to WebBlobRegistry and FileAPIMessageFilter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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 | « content/browser/streams/stream.h ('k') | content/browser/streams/stream_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/streams/stream.cc
diff --git a/content/browser/streams/stream.cc b/content/browser/streams/stream.cc
index f1fa1043e7df38eee33f6dcbc488a1a4cced50d3..f5abe0276e8a8ff85264637524b4b06811466e9a 100644
--- a/content/browser/streams/stream.cc
+++ b/content/browser/streams/stream.cc
@@ -71,6 +71,12 @@ void Stream::AddData(scoped_refptr<net::IOBuffer> buffer, size_t size) {
can_add_data_ = writer_->Write(buffer, size);
}
+void Stream::AddData(const char* data, size_t size) {
+ scoped_refptr<net::IOBuffer> io_buffer(new net::IOBuffer(size));
+ memcpy(io_buffer->data(), data, size);
+ can_add_data_ = writer_->Write(io_buffer, size);
+}
+
void Stream::Finalize() {
writer_->Close(0);
writer_.reset(NULL);
« no previous file with comments | « content/browser/streams/stream.h ('k') | content/browser/streams/stream_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698