diff options
9 files changed, 21 insertions, 19 deletions
diff --git a/chrome/browser/sync_file_system/local_change_processor.h b/chrome/browser/sync_file_system/local_change_processor.h index 3e1eed3..c891ed7 100644 --- a/chrome/browser/sync_file_system/local_change_processor.h +++ b/chrome/browser/sync_file_system/local_change_processor.h @@ -31,7 +31,7 @@ class LocalChangeProcessor { const fileapi::FileChange& change, const FilePath& local_path, const fileapi::FileSystemURL& url, - const fileapi::StatusCallback& callback) = 0; + const fileapi::SyncStatusCallback& callback) = 0; private: DISALLOW_COPY_AND_ASSIGN(LocalChangeProcessor); diff --git a/chrome/browser/sync_file_system/local_file_sync_service.cc b/chrome/browser/sync_file_system/local_file_sync_service.cc index 3dc6661..eb3616b 100644 --- a/chrome/browser/sync_file_system/local_file_sync_service.cc +++ b/chrome/browser/sync_file_system/local_file_sync_service.cc @@ -13,7 +13,7 @@ using content::BrowserThread; using fileapi::LocalFileSyncContext; -using fileapi::StatusCallback; +using fileapi::SyncStatusCallback; using fileapi::SyncCompletionCallback; namespace sync_file_system { @@ -37,7 +37,7 @@ void LocalFileSyncService::MaybeInitializeFileSystemContext( const GURL& app_origin, const std::string& service_name, fileapi::FileSystemContext* file_system_context, - const StatusCallback& callback) { + const SyncStatusCallback& callback) { sync_context_->MaybeInitializeFileSystemContext( app_origin, service_name, file_system_context, base::Bind(&LocalFileSyncService::DidInitializeFileSystemContext, @@ -64,7 +64,7 @@ void LocalFileSyncService::ApplyRemoteChange( const fileapi::FileChange& change, const FilePath& local_path, const fileapi::FileSystemURL& url, - const StatusCallback& callback) { + const SyncStatusCallback& callback) { DCHECK(ContainsKey(origin_to_contexts_, url.origin())); sync_context_->ApplyRemoteChange( origin_to_contexts_[url.origin()], @@ -74,7 +74,7 @@ void LocalFileSyncService::ApplyRemoteChange( void LocalFileSyncService::DidInitializeFileSystemContext( const GURL& app_origin, fileapi::FileSystemContext* file_system_context, - const StatusCallback& callback, + const SyncStatusCallback& callback, fileapi::SyncStatusCode status) { if (status == fileapi::SYNC_STATUS_OK) origin_to_contexts_[app_origin] = file_system_context; diff --git a/chrome/browser/sync_file_system/local_file_sync_service.h b/chrome/browser/sync_file_system/local_file_sync_service.h index 2567fab..b1d9c4e 100644 --- a/chrome/browser/sync_file_system/local_file_sync_service.h +++ b/chrome/browser/sync_file_system/local_file_sync_service.h @@ -42,7 +42,7 @@ class LocalFileSyncService const GURL& app_origin, const std::string& service_name, fileapi::FileSystemContext* file_system_context, - const fileapi::StatusCallback& callback); + const fileapi::SyncStatusCallback& callback); // Synchronize one (or a set of) local change(s) to the remote server // using |processor|. @@ -58,13 +58,13 @@ class LocalFileSyncService const fileapi::FileChange& change, const FilePath& local_path, const fileapi::FileSystemURL& url, - const fileapi::StatusCallback& callback) OVERRIDE; + const fileapi::SyncStatusCallback& callback) OVERRIDE; private: void DidInitializeFileSystemContext( const GURL& app_origin, fileapi::FileSystemContext* file_system_context, - const fileapi::StatusCallback& callback, + const fileapi::SyncStatusCallback& callback, fileapi::SyncStatusCode status); scoped_refptr<fileapi::LocalFileSyncContext> sync_context_; diff --git a/chrome/browser/sync_file_system/remote_change_processor.h b/chrome/browser/sync_file_system/remote_change_processor.h index 45c838e..a7b6fe6 100644 --- a/chrome/browser/sync_file_system/remote_change_processor.h +++ b/chrome/browser/sync_file_system/remote_change_processor.h @@ -59,7 +59,7 @@ class RemoteChangeProcessor { const fileapi::FileChange& change, const FilePath& local_path, const fileapi::FileSystemURL& url, - const fileapi::StatusCallback& callback) = 0; + const fileapi::SyncStatusCallback& callback) = 0; private: DISALLOW_COPY_AND_ASSIGN(RemoteChangeProcessor); diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc index 8b5cea5..47b39de 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service.cc +++ b/chrome/browser/sync_file_system/sync_file_system_service.cc @@ -40,7 +40,7 @@ void SyncFileSystemService::InitializeForApp( fileapi::FileSystemContext* file_system_context, const std::string& service_name, const GURL& app_url, - const fileapi::StatusCallback& callback) { + const fileapi::SyncStatusCallback& callback) { DCHECK(local_file_service_); // TODO(kinuko,tzik): Instantiate the remote_file_service for the given diff --git a/chrome/browser/sync_file_system/sync_file_system_service.h b/chrome/browser/sync_file_system/sync_file_system_service.h index 14d5efb..db7dbf4 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service.h +++ b/chrome/browser/sync_file_system/sync_file_system_service.h @@ -42,7 +42,7 @@ class SyncFileSystemService fileapi::FileSystemContext* file_system_context, const std::string& service_name, const GURL& app_url, - const fileapi::StatusCallback& callback); + const fileapi::SyncStatusCallback& callback); private: friend class SyncFileSystemServiceFactory; diff --git a/webkit/fileapi/syncable/local_file_sync_context.cc b/webkit/fileapi/syncable/local_file_sync_context.cc index 9355997..c96bcd7 100644 --- a/webkit/fileapi/syncable/local_file_sync_context.cc +++ b/webkit/fileapi/syncable/local_file_sync_context.cc @@ -39,7 +39,7 @@ void LocalFileSyncContext::MaybeInitializeFileSystemContext( const GURL& source_url, const std::string& service_name, FileSystemContext* file_system_context, - const StatusCallback& callback) { + const SyncStatusCallback& callback) { DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); if (ContainsKey(file_system_contexts_, file_system_context)) { // The context has been already initialized. Just dispatch the callback @@ -123,7 +123,7 @@ void LocalFileSyncContext::ApplyRemoteChange( const FileChange& change, const FilePath& local_path, const FileSystemURL& url, - const StatusCallback& callback) { + const SyncStatusCallback& callback) { if (!io_task_runner_->RunsTasksOnCurrentThread()) { DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); io_task_runner_->PostTask( @@ -349,7 +349,7 @@ void LocalFileSyncContext::DidGetWritingStatusForPrepareForSync( } void LocalFileSyncContext::DidApplyRemoteChange( - const StatusCallback& callback_on_ui, + const SyncStatusCallback& callback_on_ui, base::PlatformFileError file_error) { DCHECK(io_task_runner_->RunsTasksOnCurrentThread()); ui_task_runner_->PostTask( diff --git a/webkit/fileapi/syncable/local_file_sync_context.h b/webkit/fileapi/syncable/local_file_sync_context.h index ef7eacef..9c8d397 100644 --- a/webkit/fileapi/syncable/local_file_sync_context.h +++ b/webkit/fileapi/syncable/local_file_sync_context.h @@ -59,7 +59,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext void MaybeInitializeFileSystemContext(const GURL& source_url, const std::string& service_name, FileSystemContext* file_system_context, - const StatusCallback& callback); + const SyncStatusCallback& callback); // Called when the corresponding LocalFileSyncService exits. // This method must be called on UI thread. @@ -94,7 +94,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext const FileChange& change, const FilePath& local_path, const FileSystemURL& url, - const StatusCallback& callback); + const SyncStatusCallback& callback); // OperationRunner is accessible only on IO thread. base::WeakPtr<SyncableFileOperationRunner> operation_runner() const; @@ -108,7 +108,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext virtual void OnWriteEnabled(const FileSystemURL& url) OVERRIDE; private: - typedef std::deque<StatusCallback> StatusCallbackQueue; + typedef std::deque<SyncStatusCallback> StatusCallbackQueue; friend class base::RefCountedThreadSafe<LocalFileSyncContext>; friend class CannedSyncableFileSystem; @@ -143,7 +143,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext const ChangeListCallback& callback); void DidApplyRemoteChange( - const StatusCallback& callback_on_ui, + const SyncStatusCallback& callback_on_ui, base::PlatformFileError file_error); scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; diff --git a/webkit/fileapi/syncable/sync_callbacks.h b/webkit/fileapi/syncable/sync_callbacks.h index b1e8d20..f47e6ea 100644 --- a/webkit/fileapi/syncable/sync_callbacks.h +++ b/webkit/fileapi/syncable/sync_callbacks.h @@ -12,7 +12,9 @@ namespace fileapi { class FileSystemURL; -typedef base::Callback<void(SyncStatusCode status)> StatusCallback; +typedef base::Callback<void(SyncStatusCode status)> + SyncStatusCallback; + typedef base::Callback<void(SyncStatusCode status, const FileSystemURL& url)> SyncCompletionCallback; |