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

Unified Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 760823002: Introduce Stream::flush [2/2 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 1 month 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/fileapi/fileapi_message_filter.h ('k') | content/browser/streams/stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/fileapi_message_filter.cc
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 3fe4199272afabde75ebb028962f04cb569f4a5d..17e3abe4592346db8818efc2915a8047e23c65da 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -185,6 +185,7 @@ bool FileAPIMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnAppendBlobDataItemToStream)
IPC_MESSAGE_HANDLER(StreamHostMsg_SyncAppendSharedMemory,
OnAppendSharedMemoryToStream)
+ IPC_MESSAGE_HANDLER(StreamHostMsg_Flush, OnFlushStream)
IPC_MESSAGE_HANDLER(StreamHostMsg_FinishBuilding, OnFinishBuildingStream)
IPC_MESSAGE_HANDLER(StreamHostMsg_AbortBuilding, OnAbortBuildingStream)
IPC_MESSAGE_HANDLER(StreamHostMsg_Clone, OnCloneStream)
@@ -653,6 +654,13 @@ void FileAPIMessageFilter::OnAppendSharedMemoryToStream(
stream->AddData(static_cast<char*>(shared_memory.memory()), buffer_size);
}
+void FileAPIMessageFilter::OnFlushStream(const GURL& url) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ scoped_refptr<Stream> stream(GetStreamForURL(url));
+ if (stream.get())
jochen (gone - plz use gerrit) 2014/12/08 12:06:41 when can this happen? Should we kill the renderer
horo 2014/12/09 02:28:51 When the reader of the stream stops reading, the s
+ stream->Flush();
+}
+
void FileAPIMessageFilter::OnFinishBuildingStream(const GURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
scoped_refptr<Stream> stream(GetStreamForURL(url));
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.h ('k') | content/browser/streams/stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698