summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 12:43:28 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 12:43:28 +0000
commit065402665c9057f4ca0cf7bbfca035bbbf7b97a9 (patch)
tree64e951593c780adc0c8c7498bd43af2bf4a1e9b4 /webkit
parentac0ed09208b6013cf6c00c46d2129e5a33eaa609 (diff)
downloadchromium_src-065402665c9057f4ca0cf7bbfca035bbbf7b97a9.zip
chromium_src-065402665c9057f4ca0cf7bbfca035bbbf7b97a9.tar.gz
chromium_src-065402665c9057f4ca0cf7bbfca035bbbf7b97a9.tar.bz2
SyncFS: Migrate to new event system and support LOCAL_TO_REMOTE (as well as REMOTE_TO_LOCAL) sync events
Remaining: - this doesn't support pending event yet (it needs to be fired from local-side unlike other events) BUG=174825 TEST=browser_tests:SyncFileSystemAPITest.OnFileStatusChanged, unit_tests:DriveFileSyncServiceTest.RemoteChange_* TBR=thestig Review URL: https://codereview.chromium.org/12212082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181489 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/fileapi/syncable/sync_action.h26
-rw-r--r--webkit/fileapi/syncable/sync_callbacks.h5
-rw-r--r--webkit/fileapi/syncable/sync_operation_result.h11
-rw-r--r--webkit/fileapi/webkit_fileapi.gypi1
4 files changed, 34 insertions, 9 deletions
diff --git a/webkit/fileapi/syncable/sync_action.h b/webkit/fileapi/syncable/sync_action.h
new file mode 100644
index 0000000..5f93b45
--- /dev/null
+++ b/webkit/fileapi/syncable/sync_action.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_ACTION_H_
+#define WEBKIT_FILEAPI_SYNCABLE_SYNC_ACTION_H_
+
+namespace fileapi {
+
+enum SyncAction {
+ // Indicates no action has been made.
+ SYNC_ACTION_NONE,
+
+ // Indicates a new file or directory has been added.
+ SYNC_ACTION_ADDED,
+
+ // Indicates an existing file or directory has been updated.
+ SYNC_ACTION_UPDATED,
+
+ // Indicates a file or directory has been deleted.
+ SYNC_ACTION_DELETED,
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_FILEAPI_SYNCABLE_SYNC_ACTION_H_
diff --git a/webkit/fileapi/syncable/sync_callbacks.h b/webkit/fileapi/syncable/sync_callbacks.h
index 443ec61..6d725aa 100644
--- a/webkit/fileapi/syncable/sync_callbacks.h
+++ b/webkit/fileapi/syncable/sync_callbacks.h
@@ -37,11 +37,6 @@ typedef base::Callback<void(fileapi::SyncStatusCode status,
ConflictFileInfoCallback;
typedef base::Callback<void(SyncStatusCode status,
- const FileSystemURL& url,
- SyncOperationResult result)>
- SyncOperationCallback;
-
-typedef base::Callback<void(SyncStatusCode status,
SyncFileStatus sync_file_status)>
SyncFileStatusCallback;
diff --git a/webkit/fileapi/syncable/sync_operation_result.h b/webkit/fileapi/syncable/sync_operation_result.h
index d999a47..3c7b208 100644
--- a/webkit/fileapi/syncable/sync_operation_result.h
+++ b/webkit/fileapi/syncable/sync_operation_result.h
@@ -5,20 +5,23 @@
#ifndef WEBKIT_FILEAPI_SYNCABLE_SYNC_OPERATION_RESULT_H_
#define WEBKIT_FILEAPI_SYNCABLE_SYNC_OPERATION_RESULT_H_
+#include "webkit/fileapi/syncable/sync_action.h"
+
namespace fileapi {
+// TODO(kinuko): Deprecate this.
enum SyncOperationResult {
// Indicates no operation has been made.
- SYNC_OPERATION_NONE,
+ SYNC_OPERATION_NONE = SYNC_ACTION_NONE,
// Indicates a new file or directory has been added.
- SYNC_OPERATION_ADDED,
+ SYNC_OPERATION_ADDED = SYNC_ACTION_ADDED,
// Indicates an existing file or directory has been updated.
- SYNC_OPERATION_UPDATED,
+ SYNC_OPERATION_UPDATED = SYNC_ACTION_UPDATED,
// Indicates a file or directory has been deleted.
- SYNC_OPERATION_DELETED,
+ SYNC_OPERATION_DELETED = SYNC_ACTION_DELETED,
// Indicates a file or directory has conflicting changes.
SYNC_OPERATION_CONFLICTED,
diff --git a/webkit/fileapi/webkit_fileapi.gypi b/webkit/fileapi/webkit_fileapi.gypi
index 471f415..41e5305 100644
--- a/webkit/fileapi/webkit_fileapi.gypi
+++ b/webkit/fileapi/webkit_fileapi.gypi
@@ -107,6 +107,7 @@
'../fileapi/syncable/sync_file_status.h',
'../fileapi/syncable/sync_file_type.h',
'../fileapi/syncable/sync_operation_result.h',
+ '../fileapi/syncable/sync_action.h',
'../fileapi/syncable/sync_status_code.cc',
'../fileapi/syncable/sync_status_code.h',
'../fileapi/syncable/syncable_file_operation_runner.cc',