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

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: 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 scoped_ptr<net::URLRequest> request, 58 scoped_ptr<net::URLRequest> request,
59 base::PlatformFileError error, 59 base::PlatformFileError error,
60 const base::PlatformFileInfo& file_info); 60 const base::PlatformFileInfo& file_info);
61 void Read(); 61 void Read();
62 void OnDataReceived(int bytes_read); 62 void OnDataReceived(int bytes_read);
63 void Write(); 63 void Write();
64 void OnDataWritten(int write_response); 64 void OnDataWritten(int write_response);
65 void OnError(base::PlatformFileError error); 65 void OnError(base::PlatformFileError error);
66 void OnProgress(int bytes_read, bool done); 66 void OnProgress(int bytes_read, bool done);
67 void OnWriteCancelled(int status); 67 void OnWriteCancelled(int status);
68 void OnSuccessfulCompletion(int bytes_written, int status);
68 69
69 FileSystemQuotaUtil* quota_util() const; 70 FileSystemQuotaUtil* quota_util() const;
70 71
71 FileSystemOperation::WriteCallback write_callback_; 72 FileSystemOperation::WriteCallback write_callback_;
72 scoped_ptr<FileStreamWriter> file_stream_writer_; 73 scoped_ptr<FileStreamWriter> file_stream_writer_;
73 base::Time last_progress_event_time_; 74 base::Time last_progress_event_time_;
74 int bytes_written_backlog_; 75 int bytes_written_backlog_;
75 int bytes_written_; 76 int bytes_written_;
76 int bytes_read_; 77 int bytes_read_;
77 scoped_refptr<net::IOBufferWithSize> io_buffer_; 78 scoped_refptr<net::IOBufferWithSize> io_buffer_;
78 scoped_refptr<net::DrainableIOBuffer> cursor_; 79 scoped_refptr<net::DrainableIOBuffer> cursor_;
79 scoped_ptr<net::URLRequest> request_; 80 scoped_ptr<net::URLRequest> request_;
80 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; 81 base::WeakPtrFactory<FileWriterDelegate> weak_factory_;
81 }; 82 };
82 83
83 } // namespace fileapi 84 } // namespace fileapi
84 85
85 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ 86 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698