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_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 5 #ifndef WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
6 #define WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 6 #define WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 base::PlatformFileError TouchFile(const FileSystemURL& url, | 103 base::PlatformFileError TouchFile(const FileSystemURL& url, |
104 const base::Time& last_access_time, | 104 const base::Time& last_access_time, |
105 const base::Time& last_modified_time); | 105 const base::Time& last_modified_time); |
106 base::PlatformFileError Remove(const FileSystemURL& url, bool recursive); | 106 base::PlatformFileError Remove(const FileSystemURL& url, bool recursive); |
107 base::PlatformFileError FileExists(const FileSystemURL& url); | 107 base::PlatformFileError FileExists(const FileSystemURL& url); |
108 base::PlatformFileError DirectoryExists(const FileSystemURL& url); | 108 base::PlatformFileError DirectoryExists(const FileSystemURL& url); |
109 base::PlatformFileError VerifyFile(const FileSystemURL& url, | 109 base::PlatformFileError VerifyFile(const FileSystemURL& url, |
110 const std::string& expected_data); | 110 const std::string& expected_data); |
111 base::PlatformFileError GetMetadata(const FileSystemURL& url, | 111 base::PlatformFileError GetMetadata(const FileSystemURL& url, |
112 base::PlatformFileInfo* info, | 112 base::PlatformFileInfo* info, |
113 FilePath* platform_path); | 113 base::FilePath* platform_path); |
114 | 114 |
115 // Returns the # of bytes written (>=0) or an error code (<0). | 115 // Returns the # of bytes written (>=0) or an error code (<0). |
116 int64 Write(net::URLRequestContext* url_request_context, | 116 int64 Write(net::URLRequestContext* url_request_context, |
117 const FileSystemURL& url, const GURL& blob_url); | 117 const FileSystemURL& url, const GURL& blob_url); |
118 int64 WriteString(const FileSystemURL& url, const std::string& data); | 118 int64 WriteString(const FileSystemURL& url, const std::string& data); |
119 | 119 |
120 // Purges the file system local storage. | 120 // Purges the file system local storage. |
121 base::PlatformFileError DeleteFileSystem(); | 121 base::PlatformFileError DeleteFileSystem(); |
122 | 122 |
123 // Retrieves the quota and usage. | 123 // Retrieves the quota and usage. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 const StatusCallback& callback); | 165 const StatusCallback& callback); |
166 void DoFileExists(const FileSystemURL& url, | 166 void DoFileExists(const FileSystemURL& url, |
167 const StatusCallback& callback); | 167 const StatusCallback& callback); |
168 void DoDirectoryExists(const FileSystemURL& url, | 168 void DoDirectoryExists(const FileSystemURL& url, |
169 const StatusCallback& callback); | 169 const StatusCallback& callback); |
170 void DoVerifyFile(const FileSystemURL& url, | 170 void DoVerifyFile(const FileSystemURL& url, |
171 const std::string& expected_data, | 171 const std::string& expected_data, |
172 const StatusCallback& callback); | 172 const StatusCallback& callback); |
173 void DoGetMetadata(const FileSystemURL& url, | 173 void DoGetMetadata(const FileSystemURL& url, |
174 base::PlatformFileInfo* info, | 174 base::PlatformFileInfo* info, |
175 FilePath* platform_path, | 175 base::FilePath* platform_path, |
176 const StatusCallback& callback); | 176 const StatusCallback& callback); |
177 void DoWrite(net::URLRequestContext* url_request_context, | 177 void DoWrite(net::URLRequestContext* url_request_context, |
178 const FileSystemURL& url, | 178 const FileSystemURL& url, |
179 const GURL& blob_url, | 179 const GURL& blob_url, |
180 const WriteCallback& callback); | 180 const WriteCallback& callback); |
181 void DoWriteString(const FileSystemURL& url, | 181 void DoWriteString(const FileSystemURL& url, |
182 const std::string& data, | 182 const std::string& data, |
183 const WriteCallback& callback); | 183 const WriteCallback& callback); |
184 void DoGetUsageAndQuota(int64* usage, | 184 void DoGetUsageAndQuota(int64* usage, |
185 int64* quota, | 185 int64* quota, |
(...skipping 29 matching lines...) Expand all Loading... |
215 bool is_filesystem_opened_; | 215 bool is_filesystem_opened_; |
216 | 216 |
217 scoped_refptr<ObserverList> sync_status_observers_; | 217 scoped_refptr<ObserverList> sync_status_observers_; |
218 | 218 |
219 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 219 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); |
220 }; | 220 }; |
221 | 221 |
222 } // namespace fileapi | 222 } // namespace fileapi |
223 | 223 |
224 #endif // WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 224 #endif // WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
OLD | NEW |