| 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 27 matching lines...) Expand all  Loading... | 
| 38 namespace net { | 38 namespace net { | 
| 39 class URLRequestContext; | 39 class URLRequestContext; | 
| 40 } | 40 } | 
| 41 | 41 | 
| 42 namespace quota { | 42 namespace quota { | 
| 43 class QuotaManager; | 43 class QuotaManager; | 
| 44 } | 44 } | 
| 45 | 45 | 
| 46 namespace sync_file_system { | 46 namespace sync_file_system { | 
| 47 | 47 | 
|  | 48 class FileChangeList; | 
| 48 class LocalFileSyncContext; | 49 class LocalFileSyncContext; | 
| 49 class SyncFileSystemBackend; | 50 class SyncFileSystemBackend; | 
| 50 | 51 | 
| 51 // A canned syncable filesystem for testing. | 52 // A canned syncable filesystem for testing. | 
| 52 // This internally creates its own QuotaManager and FileSystemContext | 53 // This internally creates its own QuotaManager and FileSystemContext | 
| 53 // (as we do so for each isolated application). | 54 // (as we do so for each isolated application). | 
| 54 class CannedSyncableFileSystem | 55 class CannedSyncableFileSystem | 
| 55     : public LocalFileSyncStatus::Observer { | 56     : public LocalFileSyncStatus::Observer { | 
| 56  public: | 57  public: | 
| 57   typedef base::Callback<void(base::PlatformFileError)> StatusCallback; | 58   typedef base::Callback<void(base::PlatformFileError)> StatusCallback; | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 133 | 134 | 
| 134   // Purges the file system local storage. | 135   // Purges the file system local storage. | 
| 135   base::PlatformFileError DeleteFileSystem(); | 136   base::PlatformFileError DeleteFileSystem(); | 
| 136 | 137 | 
| 137   // Retrieves the quota and usage. | 138   // Retrieves the quota and usage. | 
| 138   quota::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota); | 139   quota::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota); | 
| 139 | 140 | 
| 140   // ChangeTracker related methods. They run on file task runner. | 141   // ChangeTracker related methods. They run on file task runner. | 
| 141   void GetChangedURLsInTracker(fileapi::FileSystemURLSet* urls); | 142   void GetChangedURLsInTracker(fileapi::FileSystemURLSet* urls); | 
| 142   void ClearChangeForURLInTracker(const fileapi::FileSystemURL& url); | 143   void ClearChangeForURLInTracker(const fileapi::FileSystemURL& url); | 
|  | 144   void GetChangesForURLInTracker(const fileapi::FileSystemURL& url, | 
|  | 145                                  FileChangeList* changes); | 
| 143 | 146 | 
| 144   SyncFileSystemBackend* backend(); | 147   SyncFileSystemBackend* backend(); | 
| 145   fileapi::FileSystemOperationRunner* operation_runner(); | 148   fileapi::FileSystemOperationRunner* operation_runner(); | 
| 146 | 149 | 
| 147   // LocalFileSyncStatus::Observer overrides. | 150   // LocalFileSyncStatus::Observer overrides. | 
| 148   virtual void OnSyncEnabled(const fileapi::FileSystemURL& url) OVERRIDE; | 151   virtual void OnSyncEnabled(const fileapi::FileSystemURL& url) OVERRIDE; | 
| 149   virtual void OnWriteEnabled(const fileapi::FileSystemURL& url) OVERRIDE; | 152   virtual void OnWriteEnabled(const fileapi::FileSystemURL& url) OVERRIDE; | 
| 150 | 153 | 
| 151   // Operation methods body. | 154   // Operation methods body. | 
| 152   // They can be also called directly if the caller is already on IO thread. | 155   // They can be also called directly if the caller is already on IO thread. | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 225   bool is_filesystem_opened_; | 228   bool is_filesystem_opened_; | 
| 226 | 229 | 
| 227   scoped_refptr<ObserverList> sync_status_observers_; | 230   scoped_refptr<ObserverList> sync_status_observers_; | 
| 228 | 231 | 
| 229   DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 232   DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 
| 230 }; | 233 }; | 
| 231 | 234 | 
| 232 }  // namespace sync_file_system | 235 }  // namespace sync_file_system | 
| 233 | 236 | 
| 234 #endif  // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 237 #endif  // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ | 
| OLD | NEW | 
|---|