OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ | |
6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ | |
7 #pragma once | |
8 | |
9 #include <vector> | |
10 | |
11 #include "base/basictypes.h" | |
12 #include "base/compiler_specific.h" | |
13 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" | |
14 #include "chrome/browser/sync/engine/model_safe_worker.h" | |
15 | |
16 namespace syncable { | |
17 class BaseTransaction; | |
18 class Entry; | |
19 class Id; | |
20 class WriteTransaction; | |
21 } // namespace syncable | |
22 | |
23 namespace browser_sync { | |
24 | |
25 class ConflictResolver; | |
26 class Cryptographer; | |
27 | |
28 namespace sessions { | |
29 class ConflictProgress; | |
30 class StatusController; | |
31 } | |
32 | |
33 class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand { | |
34 public: | |
35 BuildAndProcessConflictSetsCommand(); | |
36 virtual ~BuildAndProcessConflictSetsCommand(); | |
37 | |
38 protected: | |
39 // ModelChangingSyncerCommand implementation. | |
40 virtual std::set<ModelSafeGroup> GetGroupsToChange( | |
41 const sessions::SyncSession& session) const OVERRIDE; | |
42 virtual SyncerError ModelChangingExecuteImpl( | |
43 sessions::SyncSession* session) OVERRIDE; | |
44 | |
45 private: | |
46 void BuildConflictSets(syncable::BaseTransaction* trans, | |
47 sessions::ConflictProgress* conflict_progress); | |
48 | |
49 void MergeSetsForIntroducedLoops(syncable::BaseTransaction* trans, | |
50 syncable::Entry* entry, | |
51 sessions::ConflictProgress* conflict_progress); | |
52 void MergeSetsForNonEmptyDirectories(syncable::BaseTransaction* trans, | |
53 syncable::Entry* entry, | |
54 sessions::ConflictProgress* conflict_progress); | |
55 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans, | |
56 syncable::Entry* entry, | |
57 sessions::ConflictProgress* conflict_progress); | |
58 | |
59 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand); | |
60 }; | |
61 | |
62 } // namespace browser_sync | |
63 | |
64 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ | |
OLD | NEW |