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

Side by Side Diff: webkit/fileapi/file_writer_delegate.h

Issue 10986045: Flush at the end of local file writing in FileWriter API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/file_stream_writer.h ('k') | webkit/fileapi/file_writer_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ 6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 scoped_ptr<net::URLRequest> request, 70 scoped_ptr<net::URLRequest> request,
71 base::PlatformFileError error, 71 base::PlatformFileError error,
72 const base::PlatformFileInfo& file_info); 72 const base::PlatformFileInfo& file_info);
73 void Read(); 73 void Read();
74 void OnDataReceived(int bytes_read); 74 void OnDataReceived(int bytes_read);
75 void Write(); 75 void Write();
76 void OnDataWritten(int write_response); 76 void OnDataWritten(int write_response);
77 void OnError(base::PlatformFileError error); 77 void OnError(base::PlatformFileError error);
78 void OnProgress(int bytes_read, bool done); 78 void OnProgress(int bytes_read, bool done);
79 void OnWriteCancelled(int status); 79 void OnWriteCancelled(int status);
80 void FlushForCompletion(base::PlatformFileError error,
81 int bytes_written,
82 WriteProgressStatus progress_status);
83 void OnFlushed(base::PlatformFileError error,
84 int bytes_written,
85 WriteProgressStatus progress_status,
86 int flush_error);
80 87
81 FileSystemQuotaUtil* quota_util() const; 88 FileSystemQuotaUtil* quota_util() const;
82 WriteProgressStatus GetCompletionStatusOnError() const; 89 WriteProgressStatus GetCompletionStatusOnError() const;
83 90
84 DelegateWriteCallback write_callback_; 91 DelegateWriteCallback write_callback_;
85 scoped_ptr<FileStreamWriter> file_stream_writer_; 92 scoped_ptr<FileStreamWriter> file_stream_writer_;
86 base::Time last_progress_event_time_; 93 base::Time last_progress_event_time_;
87 bool writing_started_; 94 bool writing_started_;
88 int bytes_written_backlog_; 95 int bytes_written_backlog_;
89 int bytes_written_; 96 int bytes_written_;
90 int bytes_read_; 97 int bytes_read_;
91 scoped_refptr<net::IOBufferWithSize> io_buffer_; 98 scoped_refptr<net::IOBufferWithSize> io_buffer_;
92 scoped_refptr<net::DrainableIOBuffer> cursor_; 99 scoped_refptr<net::DrainableIOBuffer> cursor_;
93 scoped_ptr<net::URLRequest> request_; 100 scoped_ptr<net::URLRequest> request_;
94 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; 101 base::WeakPtrFactory<FileWriterDelegate> weak_factory_;
95 }; 102 };
96 103
97 } // namespace fileapi 104 } // namespace fileapi
98 105
99 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ 106 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_stream_writer.h ('k') | webkit/fileapi/file_writer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698