| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 60     : public LocalFileSyncStatus::Observer { | 60     : public LocalFileSyncStatus::Observer { | 
| 61  public: | 61  public: | 
| 62   typedef base::Callback<void(const GURL& root, | 62   typedef base::Callback<void(const GURL& root, | 
| 63                               const std::string& name, | 63                               const std::string& name, | 
| 64                               base::File::Error result)> | 64                               base::File::Error result)> | 
| 65       OpenFileSystemCallback; | 65       OpenFileSystemCallback; | 
| 66   typedef base::Callback<void(base::File::Error)> StatusCallback; | 66   typedef base::Callback<void(base::File::Error)> StatusCallback; | 
| 67   typedef base::Callback<void(int64)> WriteCallback; | 67   typedef base::Callback<void(int64)> WriteCallback; | 
| 68   typedef fileapi::FileSystemOperation::FileEntryList FileEntryList; | 68   typedef fileapi::FileSystemOperation::FileEntryList FileEntryList; | 
| 69 | 69 | 
|  | 70   enum QuotaMode { | 
|  | 71     QUOTA_ENABLED, | 
|  | 72     QUOTA_DISABLED, | 
|  | 73   }; | 
|  | 74 | 
| 70   CannedSyncableFileSystem(const GURL& origin, | 75   CannedSyncableFileSystem(const GURL& origin, | 
| 71                            leveldb::Env* env_override, | 76                            leveldb::Env* env_override, | 
| 72                            base::SingleThreadTaskRunner* io_task_runner, | 77                            base::SingleThreadTaskRunner* io_task_runner, | 
| 73                            base::SingleThreadTaskRunner* file_task_runner); | 78                            base::SingleThreadTaskRunner* file_task_runner); | 
| 74   virtual ~CannedSyncableFileSystem(); | 79   virtual ~CannedSyncableFileSystem(); | 
| 75 | 80 | 
| 76   // SetUp must be called before using this instance. | 81   // SetUp must be called before using this instance. | 
| 77   void SetUp(); | 82   void SetUp(QuotaMode quota_mode); | 
| 78 | 83 | 
| 79   // TearDown must be called before destructing this instance. | 84   // TearDown must be called before destructing this instance. | 
| 80   void TearDown(); | 85   void TearDown(); | 
| 81 | 86 | 
| 82   // Creates a FileSystemURL for the given (utf8) path string. | 87   // Creates a FileSystemURL for the given (utf8) path string. | 
| 83   fileapi::FileSystemURL URL(const std::string& path) const; | 88   fileapi::FileSystemURL URL(const std::string& path) const; | 
| 84 | 89 | 
| 85   // Initialize this with given |sync_context| if it hasn't | 90   // Initialize this with given |sync_context| if it hasn't | 
| 86   // been initialized. | 91   // been initialized. | 
| 87   sync_file_system::SyncStatusCode MaybeInitializeFileSystemContext( | 92   sync_file_system::SyncStatusCode MaybeInitializeFileSystemContext( | 
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 239   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. | 
| 240 | 245 | 
| 241   scoped_refptr<ObserverList> sync_status_observers_; | 246   scoped_refptr<ObserverList> sync_status_observers_; | 
| 242 | 247 | 
| 243   DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 248   DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); | 
| 244 }; | 249 }; | 
| 245 | 250 | 
| 246 }  // namespace sync_file_system | 251 }  // namespace sync_file_system | 
| 247 | 252 | 
| 248 #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 | 
|---|