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

Unified Diff: webkit/fileapi/file_writer.h

Issue 10387054: Implement SandboxFileWriter and rewrite FileWriterDelegate to use it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 years, 7 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_system_operation.cc ('k') | webkit/fileapi/file_writer_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_writer.h
diff --git a/webkit/fileapi/file_writer.h b/webkit/fileapi/file_writer.h
index c28c5d9f99053617f59749111344c47980877a1b..109b8c7dedf017c21c8273cf907d04939536fcd6 100644
--- a/webkit/fileapi/file_writer.h
+++ b/webkit/fileapi/file_writer.h
@@ -16,6 +16,12 @@ class IOBuffer;
namespace fileapi {
// A generic interface for writing to a file-like object.
+//
+// TODO(kinuko): Consider better naming. (http://crbug.com/128483)
+// Note: this does not directly correspond to FileWriter in File API (which
+// is implemented by WebCore::FileWriter), though this class is used to
+// implement a part of it. FileWriterDelegate is NOT a delegate of this
+// class either.
class FileWriter {
public:
// Closes the file. If there's an in-flight operation, it is canceled (i.e.,
@@ -31,6 +37,13 @@ class FileWriter {
// callback will be run on the thread where Write() was called when the write
// has completed.
//
+ // This errors out (either synchronously or via callback) with:
+ // net::ERR_FILE_NOT_FOUND: When the target file is not found.
+ // net::ERR_ACCESS_DENIED: When the target file is a directory or
+ // the writer has no permission on the file.
+ // net::ERR_FILE_NO_SPACE: When the write will result in out of quota
+ // or there is not enough room left on the disk.
+ //
// It is invalid to call Write while there is an in-flight async operation.
virtual int Write(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) = 0;
@@ -53,4 +66,3 @@ class FileWriter {
} // namespace fileapi
#endif // WEBKIT_FILEAPI_FILE_WRITER_H_
-
« no previous file with comments | « webkit/fileapi/file_system_operation.cc ('k') | webkit/fileapi/file_writer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698