| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 OpenFileSystemCallback; | 63 OpenFileSystemCallback; |
| 64 typedef base::Callback<void(base::File::Error)> StatusCallback; | 64 typedef base::Callback<void(base::File::Error)> StatusCallback; |
| 65 typedef base::Callback<void(int64)> WriteCallback; | 65 typedef base::Callback<void(int64)> WriteCallback; |
| 66 typedef storage::FileSystemOperation::FileEntryList FileEntryList; | 66 typedef storage::FileSystemOperation::FileEntryList FileEntryList; |
| 67 | 67 |
| 68 enum QuotaMode { | 68 enum QuotaMode { |
| 69 QUOTA_ENABLED, | 69 QUOTA_ENABLED, |
| 70 QUOTA_DISABLED, | 70 QUOTA_DISABLED, |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 CannedSyncableFileSystem(const GURL& origin, | 73 CannedSyncableFileSystem( |
| 74 leveldb::Env* env_override, | 74 const GURL& origin, |
| 75 base::SingleThreadTaskRunner* io_task_runner, | 75 leveldb::Env* env_override, |
| 76 base::SingleThreadTaskRunner* file_task_runner); | 76 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
| 77 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); |
| 77 virtual ~CannedSyncableFileSystem(); | 78 virtual ~CannedSyncableFileSystem(); |
| 78 | 79 |
| 79 // SetUp must be called before using this instance. | 80 // SetUp must be called before using this instance. |
| 80 void SetUp(QuotaMode quota_mode); | 81 void SetUp(QuotaMode quota_mode); |
| 81 | 82 |
| 82 // TearDown must be called before destructing this instance. | 83 // TearDown must be called before destructing this instance. |
| 83 void TearDown(); | 84 void TearDown(); |
| 84 | 85 |
| 85 // Creates a FileSystemURL for the given (utf8) path string. | 86 // Creates a FileSystemURL for the given (utf8) path string. |
| 86 storage::FileSystemURL URL(const std::string& path) const; | 87 storage::FileSystemURL URL(const std::string& path) const; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 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. |
| 244 | 245 |
| 245 scoped_refptr<ObserverList> sync_status_observers_; | 246 scoped_refptr<ObserverList> sync_status_observers_; |
| 246 | 247 |
| 247 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 248 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); |
| 248 }; | 249 }; |
| 249 | 250 |
| 250 } // namespace sync_file_system | 251 } // namespace sync_file_system |
| 251 | 252 |
| 252 #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 |