Chromium Code Reviews| Index: webkit/fileapi/file_writer_delegate.h |
| diff --git a/webkit/fileapi/file_writer_delegate.h b/webkit/fileapi/file_writer_delegate.h |
| index 1b7bb167b4502fd74cfae5435b1746a21040a59f..92963f129692751815882fcd76ab21d4d352aa51 100644 |
| --- a/webkit/fileapi/file_writer_delegate.h |
| +++ b/webkit/fileapi/file_writer_delegate.h |
| @@ -25,8 +25,20 @@ class FileSystemQuotaUtil; |
| class FILEAPI_EXPORT_PRIVATE FileWriterDelegate |
| : public net::URLRequest::Delegate { |
| public: |
| + enum WriteCompletionStatus { |
|
kinuko
2012/09/25 14:00:49
Since DidWrite could be called with a status repea
calvinlo
2012/09/26 05:23:07
Done.
|
| + NOT_COMPLETE, |
| + COMPLETE_SUCCESSFUL, |
| + ERROR_WRITE_STARTED, |
| + ERROR_WRITE_NOT_STARTED, |
|
kinuko
2012/09/25 14:00:49
NOT_COMPLETE always indicates successful partial w
|
| + }; |
| + |
| + typedef base::Callback<void(base::PlatformFileError result, |
| + int64 bytes, |
| + WriteCompletionStatus write_status)> |
| + DelegateWriteCallback; |
|
kinuko
2012/09/25 14:00:49
nit: indentation looks a bit off
typedef base::Ca
calvinlo
2012/09/26 05:23:07
Done.
|
| + |
| FileWriterDelegate( |
| - const FileSystemOperation::WriteCallback& write_callback, |
| + const DelegateWriteCallback& write_callback, |
| scoped_ptr<FileStreamWriter> file_writer); |
| virtual ~FileWriterDelegate(); |
| @@ -67,10 +79,12 @@ class FILEAPI_EXPORT_PRIVATE FileWriterDelegate |
| void OnWriteCancelled(int status); |
| FileSystemQuotaUtil* quota_util() const; |
| + WriteCompletionStatus ErrorCompletionStatus(); |
|
kinuko
2012/09/25 14:00:49
Please make this method const if it doesn't change
calvinlo
2012/09/26 05:23:07
Done.
|
| - FileSystemOperation::WriteCallback write_callback_; |
| + DelegateWriteCallback write_callback_; |
| scoped_ptr<FileStreamWriter> file_stream_writer_; |
| base::Time last_progress_event_time_; |
| + bool writing_started_; |
| int bytes_written_backlog_; |
| int bytes_written_; |
| int bytes_read_; |