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

Side by Side Diff: webkit/chromeos/fileapi/remote_file_stream_writer.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 | « net/base/mock_file_stream.cc ('k') | webkit/chromeos/fileapi/remote_file_stream_writer.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_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_ 5 #ifndef WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_
6 #define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_ 6 #define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 24 matching lines...) Expand all
35 RemoteFileStreamWriter( 35 RemoteFileStreamWriter(
36 const scoped_refptr<RemoteFileSystemProxyInterface>& remote_filesystem, 36 const scoped_refptr<RemoteFileSystemProxyInterface>& remote_filesystem,
37 const FileSystemURL& url, 37 const FileSystemURL& url,
38 int64 offset); 38 int64 offset);
39 virtual ~RemoteFileStreamWriter(); 39 virtual ~RemoteFileStreamWriter();
40 40
41 // FileWriter override. 41 // FileWriter override.
42 virtual int Write(net::IOBuffer* buf, int buf_len, 42 virtual int Write(net::IOBuffer* buf, int buf_len,
43 const net::CompletionCallback& callback) OVERRIDE; 43 const net::CompletionCallback& callback) OVERRIDE;
44 virtual int Cancel(const net::CompletionCallback& callback) OVERRIDE; 44 virtual int Cancel(const net::CompletionCallback& callback) OVERRIDE;
45 virtual int Flush(const net::CompletionCallback& callback) OVERRIDE;
45 46
46 private: 47 private:
47 // Callback function to do the continuation of the work of the first Write() 48 // Callback function to do the continuation of the work of the first Write()
48 // call, which tries to open the local copy of the file before writing. 49 // call, which tries to open the local copy of the file before writing.
49 void OnFileOpened( 50 void OnFileOpened(
50 net::IOBuffer* buf, 51 net::IOBuffer* buf,
51 int buf_len, 52 int buf_len,
52 const net::CompletionCallback& callback, 53 const net::CompletionCallback& callback,
53 base::PlatformFileError open_result, 54 base::PlatformFileError open_result,
54 const FilePath& local_path, 55 const FilePath& local_path,
(...skipping 10 matching lines...) Expand all
65 net::CompletionCallback pending_cancel_callback_; 66 net::CompletionCallback pending_cancel_callback_;
66 67
67 base::WeakPtrFactory<RemoteFileStreamWriter> weak_factory_; 68 base::WeakPtrFactory<RemoteFileStreamWriter> weak_factory_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(RemoteFileStreamWriter); 70 DISALLOW_COPY_AND_ASSIGN(RemoteFileStreamWriter);
70 }; 71 };
71 72
72 } // namespace fileapi 73 } // namespace fileapi
73 74
74 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_ 75 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_
OLDNEW
« no previous file with comments | « net/base/mock_file_stream.cc ('k') | webkit/chromeos/fileapi/remote_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698