| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ | 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_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 virtual ~BuildAndProcessConflictSetsCommand(); | 36 virtual ~BuildAndProcessConflictSetsCommand(); |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 // ModelChangingSyncerCommand implementation. | 39 // ModelChangingSyncerCommand implementation. |
| 40 virtual std::set<ModelSafeGroup> GetGroupsToChange( | 40 virtual std::set<ModelSafeGroup> GetGroupsToChange( |
| 41 const sessions::SyncSession& session) const OVERRIDE; | 41 const sessions::SyncSession& session) const OVERRIDE; |
| 42 virtual SyncerError ModelChangingExecuteImpl( | 42 virtual SyncerError ModelChangingExecuteImpl( |
| 43 sessions::SyncSession* session) OVERRIDE; | 43 sessions::SyncSession* session) OVERRIDE; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 bool BuildAndProcessConflictSets(sessions::SyncSession* session); | |
| 47 | |
| 48 bool ProcessSingleDirectionConflictSets( | |
| 49 syncable::WriteTransaction* trans, ConflictResolver* resolver, | |
| 50 Cryptographer* cryptographer, sessions::StatusController* status, | |
| 51 const ModelSafeRoutingInfo& routes); | |
| 52 bool ApplyUpdatesTransactionally( | |
| 53 syncable::WriteTransaction* trans, | |
| 54 const std::vector<syncable::Id>* const update_set, | |
| 55 ConflictResolver* resolver, | |
| 56 Cryptographer* cryptographer, | |
| 57 const ModelSafeRoutingInfo& routes, | |
| 58 sessions::StatusController* status); | |
| 59 void BuildConflictSets(syncable::BaseTransaction* trans, | 46 void BuildConflictSets(syncable::BaseTransaction* trans, |
| 60 sessions::ConflictProgress* conflict_progress); | 47 sessions::ConflictProgress* conflict_progress); |
| 61 | 48 |
| 62 void MergeSetsForNameClash(syncable::BaseTransaction* trans, | |
| 63 syncable::Entry* entry, | |
| 64 sessions::ConflictProgress* conflict_progress); | |
| 65 void MergeSetsForIntroducedLoops(syncable::BaseTransaction* trans, | 49 void MergeSetsForIntroducedLoops(syncable::BaseTransaction* trans, |
| 66 syncable::Entry* entry, | 50 syncable::Entry* entry, |
| 67 sessions::ConflictProgress* conflict_progress); | 51 sessions::ConflictProgress* conflict_progress); |
| 68 void MergeSetsForNonEmptyDirectories(syncable::BaseTransaction* trans, | 52 void MergeSetsForNonEmptyDirectories(syncable::BaseTransaction* trans, |
| 69 syncable::Entry* entry, | 53 syncable::Entry* entry, |
| 70 sessions::ConflictProgress* conflict_progress); | 54 sessions::ConflictProgress* conflict_progress); |
| 71 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans, | 55 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans, |
| 72 syncable::Entry* entry, | 56 syncable::Entry* entry, |
| 73 sessions::ConflictProgress* conflict_progress); | 57 sessions::ConflictProgress* conflict_progress); |
| 74 | 58 |
| 75 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand); | 59 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand); |
| 76 }; | 60 }; |
| 77 | 61 |
| 78 } // namespace browser_sync | 62 } // namespace browser_sync |
| 79 | 63 |
| 80 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ | 64 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ |
| OLD | NEW |