OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/file_util_proxy.h" | 11 #include "base/file_util_proxy.h" |
12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
15 #include "base/scoped_callback_factory.h" | 15 #include "base/scoped_callback_factory.h" |
16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class Time; | 20 class Time; |
21 } | 21 } |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 class URLRequest; | 24 class URLRequest; |
| 25 class URLRequestContext; |
25 } // namespace net | 26 } // namespace net |
26 | 27 |
27 class GURL; | 28 class GURL; |
28 class URLRequestContext; | |
29 | 29 |
30 namespace fileapi { | 30 namespace fileapi { |
31 | 31 |
32 class FileSystemCallbackDispatcher; | 32 class FileSystemCallbackDispatcher; |
33 class FileWriterDelegate; | 33 class FileWriterDelegate; |
34 | 34 |
35 // This class is designed to serve one-time file system operation per instance. | 35 // This class is designed to serve one-time file system operation per instance. |
36 // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, | 36 // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, |
37 // GetMetadata, ReadDirectory and Remove) may be called during the lifetime of | 37 // GetMetadata, ReadDirectory and Remove) may be called during the lifetime of |
38 // this object and it should be called no more than once. | 38 // this object and it should be called no more than once. |
(...skipping 22 matching lines...) Expand all Loading... |
61 virtual void DirectoryExists(const FilePath& path); | 61 virtual void DirectoryExists(const FilePath& path); |
62 | 62 |
63 virtual void FileExists(const FilePath& path); | 63 virtual void FileExists(const FilePath& path); |
64 | 64 |
65 virtual void GetMetadata(const FilePath& path); | 65 virtual void GetMetadata(const FilePath& path); |
66 | 66 |
67 virtual void ReadDirectory(const FilePath& path); | 67 virtual void ReadDirectory(const FilePath& path); |
68 | 68 |
69 virtual void Remove(const FilePath& path, bool recursive); | 69 virtual void Remove(const FilePath& path, bool recursive); |
70 | 70 |
71 virtual void Write(scoped_refptr<URLRequestContext> url_request_context, | 71 virtual void Write(scoped_refptr<net::URLRequestContext> url_request_context, |
72 const FilePath& path, | 72 const FilePath& path, |
73 const GURL& blob_url, | 73 const GURL& blob_url, |
74 int64 offset); | 74 int64 offset); |
75 | 75 |
76 virtual void Truncate(const FilePath& path, int64 length); | 76 virtual void Truncate(const FilePath& path, int64 length); |
77 | 77 |
78 virtual void TouchFile(const FilePath& path, | 78 virtual void TouchFile(const FilePath& path, |
79 const base::Time& last_access_time, | 79 const base::Time& last_access_time, |
80 const base::Time& last_modified_time); | 80 const base::Time& last_modified_time); |
81 | 81 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 scoped_ptr<FileWriterDelegate> file_writer_delegate_; | 159 scoped_ptr<FileWriterDelegate> file_writer_delegate_; |
160 scoped_ptr<net::URLRequest> blob_request_; | 160 scoped_ptr<net::URLRequest> blob_request_; |
161 scoped_ptr<FileSystemOperation> cancel_operation_; | 161 scoped_ptr<FileSystemOperation> cancel_operation_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); | 163 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); |
164 }; | 164 }; |
165 | 165 |
166 } // namespace fileapi | 166 } // namespace fileapi |
167 | 167 |
168 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 168 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |