OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 base::File::Error GetMetadataAndPlatformPath( | 133 base::File::Error GetMetadataAndPlatformPath( |
134 const storage::FileSystemURL& url, | 134 const storage::FileSystemURL& url, |
135 base::File::Info* info, | 135 base::File::Info* info, |
136 base::FilePath* platform_path); | 136 base::FilePath* platform_path); |
137 base::File::Error ReadDirectory(const storage::FileSystemURL& url, | 137 base::File::Error ReadDirectory(const storage::FileSystemURL& url, |
138 FileEntryList* entries); | 138 FileEntryList* entries); |
139 | 139 |
140 // Returns the # of bytes written (>=0) or an error code (<0). | 140 // Returns the # of bytes written (>=0) or an error code (<0). |
141 int64 Write(net::URLRequestContext* url_request_context, | 141 int64 Write(net::URLRequestContext* url_request_context, |
142 const storage::FileSystemURL& url, | 142 const storage::FileSystemURL& url, |
143 scoped_ptr<storage::BlobDataHandle> blob_data_handle); | 143 scoped_ptr<storage::BlobDataSnapshotHandle> blob_data_handle); |
144 int64 WriteString(const storage::FileSystemURL& url, const std::string& data); | 144 int64 WriteString(const storage::FileSystemURL& url, const std::string& data); |
145 | 145 |
146 // Purges the file system local storage. | 146 // Purges the file system local storage. |
147 base::File::Error DeleteFileSystem(); | 147 base::File::Error DeleteFileSystem(); |
148 | 148 |
149 // Retrieves the quota and usage. | 149 // Retrieves the quota and usage. |
150 storage::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota); | 150 storage::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota); |
151 | 151 |
152 // ChangeTracker related methods. They run on file task runner. | 152 // ChangeTracker related methods. They run on file task runner. |
153 void GetChangedURLsInTracker(storage::FileSystemURLSet* urls); | 153 void GetChangedURLsInTracker(storage::FileSystemURLSet* urls); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 const StatusCallback& callback); | 194 const StatusCallback& callback); |
195 void DoGetMetadataAndPlatformPath(const storage::FileSystemURL& url, | 195 void DoGetMetadataAndPlatformPath(const storage::FileSystemURL& url, |
196 base::File::Info* info, | 196 base::File::Info* info, |
197 base::FilePath* platform_path, | 197 base::FilePath* platform_path, |
198 const StatusCallback& callback); | 198 const StatusCallback& callback); |
199 void DoReadDirectory(const storage::FileSystemURL& url, | 199 void DoReadDirectory(const storage::FileSystemURL& url, |
200 FileEntryList* entries, | 200 FileEntryList* entries, |
201 const StatusCallback& callback); | 201 const StatusCallback& callback); |
202 void DoWrite(net::URLRequestContext* url_request_context, | 202 void DoWrite(net::URLRequestContext* url_request_context, |
203 const storage::FileSystemURL& url, | 203 const storage::FileSystemURL& url, |
204 scoped_ptr<storage::BlobDataHandle> blob_data_handle, | 204 scoped_ptr<storage::BlobDataSnapshotHandle> blob_data_handle, |
205 const WriteCallback& callback); | 205 const WriteCallback& callback); |
206 void DoWriteString(const storage::FileSystemURL& url, | 206 void DoWriteString(const storage::FileSystemURL& url, |
207 const std::string& data, | 207 const std::string& data, |
208 const WriteCallback& callback); | 208 const WriteCallback& callback); |
209 void DoGetUsageAndQuota(int64* usage, | 209 void DoGetUsageAndQuota(int64* usage, |
210 int64* quota, | 210 int64* quota, |
211 const storage::StatusCallback& callback); | 211 const storage::StatusCallback& callback); |
212 | 212 |
213 private: | 213 private: |
214 typedef ObserverListThreadSafe<LocalFileSyncStatus::Observer> ObserverList; | 214 typedef ObserverListThreadSafe<LocalFileSyncStatus::Observer> ObserverList; |
(...skipping 29 matching lines...) Expand all Loading... |
244 bool is_filesystem_opened_; // Should be accessed only on the IO thread. | 244 bool is_filesystem_opened_; // Should be accessed only on the IO thread. |
245 | 245 |
246 scoped_refptr<ObserverList> sync_status_observers_; | 246 scoped_refptr<ObserverList> sync_status_observers_; |
247 | 247 |
248 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 248 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); |
249 }; | 249 }; |
250 | 250 |
251 } // namespace sync_file_system | 251 } // namespace sync_file_system |
252 | 252 |
253 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 253 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ |
OLD | NEW |