OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2006-2009 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 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" |
| 12 |
| 13 namespace syncable { |
| 14 class BaseTransaction; |
| 15 class Entry; |
| 16 class Id; |
| 17 class MutableEntry; |
| 18 class WriteTransaction; |
| 19 } // namespace syncable |
| 20 |
| 21 namespace browser_sync { |
| 22 |
| 23 class ConflictResolutionView; |
| 24 class SyncerSession; |
| 25 |
| 26 class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand { |
| 27 public: |
| 28 BuildAndProcessConflictSetsCommand(); |
| 29 virtual ~BuildAndProcessConflictSetsCommand(); |
| 30 |
| 31 virtual void ModelChangingExecuteImpl(SyncerSession *session); |
| 32 |
| 33 private: |
| 34 bool BuildAndProcessConflictSets(SyncerSession *session); |
| 35 |
| 36 bool ProcessSingleDirectionConflictSets( |
| 37 syncable::WriteTransaction* trans, SyncerSession* const session); |
| 38 bool ApplyUpdatesTransactionally( |
| 39 syncable::WriteTransaction* trans, |
| 40 const std::vector<syncable::Id>* const update_set, |
| 41 SyncerSession* const session); |
| 42 void BuildAndProcessConflictSetsCommand::BuildConflictSets( |
| 43 syncable::BaseTransaction* trans, |
| 44 ConflictResolutionView* view); |
| 45 |
| 46 void MergeSetsForNameClash(syncable::BaseTransaction* trans, |
| 47 syncable::Entry* entry, |
| 48 ConflictResolutionView* view); |
| 49 void MergeSetsForIntroducedLoops(syncable::BaseTransaction* trans, |
| 50 syncable::Entry* entry, |
| 51 ConflictResolutionView* view); |
| 52 void MergeSetsForNonEmptyDirectories(syncable::BaseTransaction* trans, |
| 53 syncable::Entry* entry, |
| 54 ConflictResolutionView* view); |
| 55 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans, |
| 56 syncable::Entry* entry, |
| 57 ConflictResolutionView* view); |
| 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 |