| 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_SYNC_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/sync_file_system/sync_callbacks.h" | 9 #include "chrome/browser/sync_file_system/sync_callbacks.h" |
| 10 #include "chrome/browser/sync_file_system/sync_status_code.h" | 10 #include "chrome/browser/sync_file_system/sync_status_code.h" |
| 11 #include "content/public/browser/notification_observer.h" | 11 #include "content/public/browser/notification_observer.h" |
| 12 #include "content/public/browser/notification_registrar.h" | 12 #include "content/public/browser/notification_registrar.h" |
| 13 #include "storage/browser/fileapi/file_system_backend.h" | 13 #include "storage/browser/fileapi/file_system_backend.h" |
| 14 #include "storage/browser/fileapi/file_system_quota_util.h" | 14 #include "storage/browser/fileapi/file_system_quota_util.h" |
| 15 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h" | 15 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h" |
| 16 #include "storage/browser/fileapi/task_runner_bound_observer_list.h" |
| 16 | 17 |
| 17 namespace sync_file_system { | 18 namespace sync_file_system { |
| 18 | 19 |
| 19 class LocalFileChangeTracker; | 20 class LocalFileChangeTracker; |
| 20 class LocalFileSyncContext; | 21 class LocalFileSyncContext; |
| 21 | 22 |
| 22 class SyncFileSystemBackend : public storage::FileSystemBackend { | 23 class SyncFileSystemBackend : public storage::FileSystemBackend { |
| 23 public: | 24 public: |
| 24 explicit SyncFileSystemBackend(Profile* profile); | 25 explicit SyncFileSystemBackend(Profile* profile); |
| 25 virtual ~SyncFileSystemBackend(); | 26 virtual ~SyncFileSystemBackend(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( | 51 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| 51 const storage::FileSystemURL& url, | 52 const storage::FileSystemURL& url, |
| 52 int64 offset, | 53 int64 offset, |
| 53 const base::Time& expected_modification_time, | 54 const base::Time& expected_modification_time, |
| 54 storage::FileSystemContext* context) const OVERRIDE; | 55 storage::FileSystemContext* context) const OVERRIDE; |
| 55 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( | 56 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
| 56 const storage::FileSystemURL& url, | 57 const storage::FileSystemURL& url, |
| 57 int64 offset, | 58 int64 offset, |
| 58 storage::FileSystemContext* context) const OVERRIDE; | 59 storage::FileSystemContext* context) const OVERRIDE; |
| 59 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 60 virtual storage::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
| 61 virtual const storage::UpdateObserverList* GetUpdateObservers( |
| 62 storage::FileSystemType type) const OVERRIDE; |
| 63 virtual const storage::ChangeObserverList* GetChangeObservers( |
| 64 storage::FileSystemType type) const OVERRIDE; |
| 65 virtual const storage::AccessObserverList* GetAccessObservers( |
| 66 storage::FileSystemType type) const OVERRIDE; |
| 60 | 67 |
| 61 static SyncFileSystemBackend* GetBackend( | 68 static SyncFileSystemBackend* GetBackend( |
| 62 const storage::FileSystemContext* context); | 69 const storage::FileSystemContext* context); |
| 63 | 70 |
| 64 LocalFileChangeTracker* change_tracker() { return change_tracker_.get(); } | 71 LocalFileChangeTracker* change_tracker() { return change_tracker_.get(); } |
| 65 void SetLocalFileChangeTracker(scoped_ptr<LocalFileChangeTracker> tracker); | 72 void SetLocalFileChangeTracker(scoped_ptr<LocalFileChangeTracker> tracker); |
| 66 | 73 |
| 67 LocalFileSyncContext* sync_context() { return sync_context_.get(); } | 74 LocalFileSyncContext* sync_context() { return sync_context_.get(); } |
| 68 void set_sync_context(LocalFileSyncContext* sync_context); | 75 void set_sync_context(LocalFileSyncContext* sync_context); |
| 69 | 76 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 storage::OpenFileSystemMode mode, | 116 storage::OpenFileSystemMode mode, |
| 110 const OpenFileSystemCallback& callback, | 117 const OpenFileSystemCallback& callback, |
| 111 SyncStatusCode status); | 118 SyncStatusCode status); |
| 112 | 119 |
| 113 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemBackend); | 120 DISALLOW_COPY_AND_ASSIGN(SyncFileSystemBackend); |
| 114 }; | 121 }; |
| 115 | 122 |
| 116 } // namespace sync_file_system | 123 } // namespace sync_file_system |
| 117 | 124 |
| 118 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ | 125 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_SYNC_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |