OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_SYNC_OPERATION_RESO
LVER_H_ | |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_SYNC_OPERATION_RESO
LVER_H_ | |
7 | |
8 #include "base/gtest_prod_util.h" | |
9 #include "chrome/browser/sync_file_system/file_change.h" | |
10 #include "chrome/browser/sync_file_system/sync_file_type.h" | |
11 #include "chrome/browser/sync_file_system/sync_operation_type.h" | |
12 | |
13 namespace sync_file_system { | |
14 | |
15 class RemoteSyncOperationResolver { | |
16 public: | |
17 static SyncOperationType Resolve( | |
18 const FileChange& remote_file_change, | |
19 const FileChangeList& local_changes, | |
20 SyncFileType local_file_type, | |
21 bool is_conflicting); | |
22 | |
23 private: | |
24 static SyncOperationType ResolveForAddOrUpdateFile( | |
25 const FileChangeList& local_changes, | |
26 SyncFileType local_file_type); | |
27 static SyncOperationType ResolveForAddOrUpdateFileInConflict( | |
28 const FileChangeList& local_changes, | |
29 SyncFileType local_file_type); | |
30 static SyncOperationType ResolveForAddDirectory( | |
31 const FileChangeList& local_changes, | |
32 SyncFileType local_file_type); | |
33 static SyncOperationType ResolveForAddDirectoryInConflict( | |
34 const FileChangeList& local_changes, | |
35 SyncFileType local_file_type); | |
36 static SyncOperationType ResolveForDeleteFile( | |
37 const FileChangeList& local_changes, | |
38 SyncFileType local_file_type); | |
39 static SyncOperationType ResolveForDeleteFileInConflict( | |
40 const FileChangeList& local_changes, | |
41 SyncFileType local_file_type); | |
42 static SyncOperationType ResolveForDeleteDirectory( | |
43 const FileChangeList& local_changes, | |
44 SyncFileType local_file_type); | |
45 static SyncOperationType ResolveForDeleteDirectoryInConflict( | |
46 const FileChangeList& local_changes, | |
47 SyncFileType local_file_type); | |
48 | |
49 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
50 ResolveForAddOrUpdateFile); | |
51 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
52 ResolveForAddOrUpdateFileInConflict); | |
53 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
54 ResolveForAddDirectory); | |
55 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
56 ResolveForAddDirectoryInConflict); | |
57 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
58 ResolveForDeleteFile); | |
59 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
60 ResolveForDeleteFileInConflict); | |
61 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
62 ResolveForDeleteDirectory); | |
63 FRIEND_TEST_ALL_PREFIXES(RemoteSyncOperationResolverTest, | |
64 ResolveForDeleteDirectoryInConflict); | |
65 }; | |
66 | |
67 } // namespace sync_file_system | |
68 | |
69 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_REMOTE_SYNC_OPERATION_R
ESOLVER_H_ | |
OLD | NEW |