OLD | NEW |
---|---|
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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "webkit/fileapi/file_stream_writer.h" | 13 #include "webkit/fileapi/file_stream_writer.h" |
14 #include "webkit/fileapi/file_system_operation_interface.h" | 14 #include "webkit/fileapi/file_system_operation_interface.h" |
15 #include "webkit/fileapi/file_system_url.h" | 15 #include "webkit/fileapi/file_system_url.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 class IOBuffer; | 18 class IOBuffer; |
19 } | 19 } |
20 | 20 |
21 namespace fileapi { | 21 namespace fileapi { |
22 | 22 |
23 class RemoteFileSystemProxyInterface; | 23 class RemoteFileSystemProxyInterface; |
24 | 24 |
25 // FileStreamWriter interface for writing to a file on GData file system. | 25 // FileStreamWriter interface for writing to a file on Drive file system. |
kinaba
2012/08/23 10:28:46
Ahh, I'm the original writer of this comment ;(, b
kochi
2012/08/23 10:50:32
Done.
| |
26 class RemoteFileStreamWriter : public fileapi::FileStreamWriter { | 26 class RemoteFileStreamWriter : public fileapi::FileStreamWriter { |
27 public: | 27 public: |
28 // Creates a writer for a file on |remote_filesystem| with path url |url| | 28 // Creates a writer for a file on |remote_filesystem| with path url |url| |
29 // (like "filesystem:chrome-extension://id/external/special/drive/...") that | 29 // (like "filesystem:chrome-extension://id/external/special/drive/...") that |
30 // starts writing from |offset|. When invalid parameters are set, the first | 30 // starts writing from |offset|. When invalid parameters are set, the first |
31 // call to Write() method fails. | 31 // call to Write() method fails. |
32 RemoteFileStreamWriter( | 32 RemoteFileStreamWriter( |
33 const scoped_refptr<RemoteFileSystemProxyInterface>& remote_filesystem, | 33 const scoped_refptr<RemoteFileSystemProxyInterface>& remote_filesystem, |
34 const FileSystemURL& url, | 34 const FileSystemURL& url, |
35 int64 offset); | 35 int64 offset); |
(...skipping 26 matching lines...) Expand all Loading... | |
62 net::CompletionCallback pending_cancel_callback_; | 62 net::CompletionCallback pending_cancel_callback_; |
63 | 63 |
64 base::WeakPtrFactory<RemoteFileStreamWriter> weak_factory_; | 64 base::WeakPtrFactory<RemoteFileStreamWriter> weak_factory_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(RemoteFileStreamWriter); | 66 DISALLOW_COPY_AND_ASSIGN(RemoteFileStreamWriter); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace fileapi | 69 } // namespace fileapi |
70 | 70 |
71 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_ | 71 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_STREAM_WRITER_H_ |
OLD | NEW |