diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-22 07:19:52 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-22 07:19:52 +0000 |
commit | bd69420d26682c79f6b6392839ba9bac4412a083 (patch) | |
tree | a5fc3edbede111c611c612acee141d607a850aaa /webkit | |
parent | e8493378d9a04ca858c983adb2f38608b2064885 (diff) | |
download | chromium_src-bd69420d26682c79f6b6392839ba9bac4412a083.zip chromium_src-bd69420d26682c79f6b6392839ba9bac4412a083.tar.gz chromium_src-bd69420d26682c79f6b6392839ba9bac4412a083.tar.bz2 |
Add SyncOperationType to ProcessRemoteChange's callback
- Separates out SyncOperation type enum from sync_event_observer.h into its own file (webkit/fileapi/syncable/sync_operation_type.h)
- Changes RemoteFileSyncService::ProcessRemoteChange to return SyncOperationType in its callback (no change in the local side for now as the ProcessLocalChange may make multiple changes in the current implementation)
- Fixes SyncEventObserver::OnFileSynced signature as well
BUG=162358
TEST=to be added
Review URL: https://codereview.chromium.org/11419129
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/fileapi/syncable/sync_callbacks.h | 6 | ||||
-rw-r--r-- | webkit/fileapi/syncable/sync_operation_type.h | 26 | ||||
-rw-r--r-- | webkit/fileapi/webkit_fileapi.gypi | 1 |
3 files changed, 33 insertions, 0 deletions
diff --git a/webkit/fileapi/syncable/sync_callbacks.h b/webkit/fileapi/syncable/sync_callbacks.h index cd26b0e..2677e42 100644 --- a/webkit/fileapi/syncable/sync_callbacks.h +++ b/webkit/fileapi/syncable/sync_callbacks.h @@ -7,6 +7,7 @@ #include "base/callback_forward.h" #include "webkit/fileapi/file_system_url.h" +#include "webkit/fileapi/syncable/sync_operation_type.h" #include "webkit/fileapi/syncable/sync_status_code.h" namespace fileapi { @@ -34,6 +35,11 @@ typedef base::Callback<void(fileapi::SyncStatusCode status, const fileapi::ConflictFileInfo& conflict_info)> ConflictFileInfoCallback; +typedef base::Callback<void(SyncStatusCode status, + const FileSystemURL& url, + SyncOperationType operation_type)> + SyncOperationCallback; + } // namespace fileapi #endif // WEBKIT_FILEAPI_SYNCABLE_SYNC_CALLBACKS_H_ diff --git a/webkit/fileapi/syncable/sync_operation_type.h b/webkit/fileapi/syncable/sync_operation_type.h new file mode 100644 index 0000000..0642a84 --- /dev/null +++ b/webkit/fileapi/syncable/sync_operation_type.h @@ -0,0 +1,26 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_FILEAPI_SYNCABLE_SYNC_OPERATION_TYPE_H_ +#define WEBKIT_FILEAPI_SYNCABLE_SYNC_OPERATION_TYPE_H_ + +namespace fileapi { + +enum SyncOperationType { + // Indicates no operation has been made. + SYNC_OPERATION_NONE, + + // Indicates a new file or directory has been added. + SYNC_OPERATION_ADD, + + // Indicates an existing file or directory has been updated. + SYNC_OPERATION_UPDATE, + + // Indicates a file or directory has been deleted. + SYNC_OPERATION_DELETE, +}; + +} // namespace fileapi + +#endif // WEBKIT_FILEAPI_SYNCABLE_SYNC_OPERATION_TYPE_H_ diff --git a/webkit/fileapi/webkit_fileapi.gypi b/webkit/fileapi/webkit_fileapi.gypi index 69a03f8..b669109 100644 --- a/webkit/fileapi/webkit_fileapi.gypi +++ b/webkit/fileapi/webkit_fileapi.gypi @@ -91,6 +91,7 @@ '../fileapi/syncable/sync_file_metadata.cc', '../fileapi/syncable/sync_file_metadata.h', '../fileapi/syncable/sync_file_type.h', + '../fileapi/syncable/sync_operation_type.h', '../fileapi/syncable/sync_status_code.cc', '../fileapi/syncable/sync_status_code.h', '../fileapi/syncable/syncable_file_operation_runner.cc', |