| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ | 5 #ifndef WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ |
| 6 #define WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ | 6 #define WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // | 108 // |
| 109 // This method must be called on UI thread. | 109 // This method must be called on UI thread. |
| 110 void RegisterURLForWaitingSync(const FileSystemURL& url, | 110 void RegisterURLForWaitingSync(const FileSystemURL& url, |
| 111 const base::Closure& on_syncable_callback); | 111 const base::Closure& on_syncable_callback); |
| 112 | 112 |
| 113 // Applies a remote change. | 113 // Applies a remote change. |
| 114 // This method must be called on UI thread. | 114 // This method must be called on UI thread. |
| 115 void ApplyRemoteChange( | 115 void ApplyRemoteChange( |
| 116 FileSystemContext* file_system_context, | 116 FileSystemContext* file_system_context, |
| 117 const FileChange& change, | 117 const FileChange& change, |
| 118 const FilePath& local_path, | 118 const base::FilePath& local_path, |
| 119 const FileSystemURL& url, | 119 const FileSystemURL& url, |
| 120 const SyncStatusCallback& callback); | 120 const SyncStatusCallback& callback); |
| 121 | 121 |
| 122 // Records a fake local change in the local change tracker. | 122 // Records a fake local change in the local change tracker. |
| 123 void RecordFakeLocalChange( | 123 void RecordFakeLocalChange( |
| 124 FileSystemContext* file_system_context, | 124 FileSystemContext* file_system_context, |
| 125 const fileapi::FileSystemURL& url, | 125 const fileapi::FileSystemURL& url, |
| 126 const fileapi::FileChange& change, | 126 const fileapi::FileChange& change, |
| 127 const fileapi::SyncStatusCallback& callback); | 127 const fileapi::SyncStatusCallback& callback); |
| 128 | 128 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // Callback routine for ApplyRemoteChange. | 229 // Callback routine for ApplyRemoteChange. |
| 230 void DidApplyRemoteChange( | 230 void DidApplyRemoteChange( |
| 231 const FileSystemURL& url, | 231 const FileSystemURL& url, |
| 232 const SyncStatusCallback& callback_on_ui, | 232 const SyncStatusCallback& callback_on_ui, |
| 233 base::PlatformFileError file_error); | 233 base::PlatformFileError file_error); |
| 234 | 234 |
| 235 void DidGetFileMetadata( | 235 void DidGetFileMetadata( |
| 236 const SyncFileMetadataCallback& callback, | 236 const SyncFileMetadataCallback& callback, |
| 237 base::PlatformFileError file_error, | 237 base::PlatformFileError file_error, |
| 238 const base::PlatformFileInfo& file_info, | 238 const base::PlatformFileInfo& file_info, |
| 239 const FilePath& platform_path); | 239 const base::FilePath& platform_path); |
| 240 | 240 |
| 241 base::TimeDelta NotifyChangesDuration(); | 241 base::TimeDelta NotifyChangesDuration(); |
| 242 | 242 |
| 243 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 243 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 244 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 244 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 245 | 245 |
| 246 // Indicates if the sync service is shutdown on UI thread. | 246 // Indicates if the sync service is shutdown on UI thread. |
| 247 bool shutdown_on_ui_; | 247 bool shutdown_on_ui_; |
| 248 | 248 |
| 249 // OperationRunner. This must be accessed only on IO thread. | 249 // OperationRunner. This must be accessed only on IO thread. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 275 ObserverList<LocalOriginChangeObserver> origin_change_observers_; | 275 ObserverList<LocalOriginChangeObserver> origin_change_observers_; |
| 276 | 276 |
| 277 int mock_notify_changes_duration_in_sec_; | 277 int mock_notify_changes_duration_in_sec_; |
| 278 | 278 |
| 279 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext); | 279 DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext); |
| 280 }; | 280 }; |
| 281 | 281 |
| 282 } // namespace fileapi | 282 } // namespace fileapi |
| 283 | 283 |
| 284 #endif // WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ | 284 #endif // WEBKIT_FILEAPI_SYNCABLE_LOCAL_FILE_SYNC_CONTEXT_H_ |
| OLD | NEW |