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

Unified Diff: webkit/fileapi/local_file_stream_writer.h

Issue 11030044: Merge 159454 - Flush at the end of local file writing in FileWriter API. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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 | « webkit/fileapi/file_writer_delegate.cc ('k') | webkit/fileapi/local_file_stream_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_stream_writer.h
===================================================================
--- webkit/fileapi/local_file_stream_writer.h (revision 160294)
+++ webkit/fileapi/local_file_stream_writer.h (working copy)
@@ -30,10 +30,11 @@
LocalFileStreamWriter(const FilePath& file_path, int64 initial_offset);
virtual ~LocalFileStreamWriter();
- // FileStreamWriteroverrides.
+ // FileStreamWriter overrides.
virtual int Write(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) OVERRIDE;
virtual int Cancel(const net::CompletionCallback& callback) OVERRIDE;
+ virtual int Flush(const net::CompletionCallback& callback) OVERRIDE;
private:
// Opens |file_path_| and if it succeeds, proceeds to InitiateSeek().
@@ -61,6 +62,10 @@
const net::CompletionCallback& callback);
void DidWrite(const net::CompletionCallback& callback, int result);
+ // Flushes asynchronously to the file.
+ int InitiateFlush(const net::CompletionCallback& callback);
+ void DidFlush(const net::CompletionCallback& callback, int result);
+
// Stops the in-flight operation and calls |cancel_callback_| if it has been
// set by Cancel() for the current operation.
bool CancelIfRequested();
« no previous file with comments | « webkit/fileapi/file_writer_delegate.cc ('k') | webkit/fileapi/local_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698