| 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 // A class that watches the syncer and attempts to resolve any conflicts that | 5 // A class that watches the syncer and attempts to resolve any conflicts that |
| 6 // occur. | 6 // occur. |
| 7 | 7 |
| 8 #ifndef SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 8 #ifndef SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| 9 #define SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 9 #define SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const Cryptographer* cryptographer, | 58 const Cryptographer* cryptographer, |
| 59 const sessions::ConflictProgress& progress, | 59 const sessions::ConflictProgress& progress, |
| 60 sessions::StatusController* status); | 60 sessions::StatusController* status); |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 enum ProcessSimpleConflictResult { | 63 enum ProcessSimpleConflictResult { |
| 64 NO_SYNC_PROGRESS, // No changes to advance syncing made. | 64 NO_SYNC_PROGRESS, // No changes to advance syncing made. |
| 65 SYNC_PROGRESS, // Progress made. | 65 SYNC_PROGRESS, // Progress made. |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 void IgnoreLocalChanges(syncable::MutableEntry* entry); | |
| 69 void OverwriteServerChanges(syncable::WriteTransaction* trans, | |
| 70 syncable::MutableEntry* entry); | |
| 71 | |
| 72 ProcessSimpleConflictResult ProcessSimpleConflict( | 68 ProcessSimpleConflictResult ProcessSimpleConflict( |
| 73 syncable::WriteTransaction* trans, | 69 syncable::WriteTransaction* trans, |
| 74 const syncable::Id& id, | 70 const syncable::Id& id, |
| 75 const Cryptographer* cryptographer, | 71 const Cryptographer* cryptographer, |
| 76 sessions::StatusController* status); | 72 sessions::StatusController* status); |
| 77 | 73 |
| 78 bool ResolveSimpleConflicts(syncable::WriteTransaction* trans, | 74 bool ResolveSimpleConflicts(syncable::WriteTransaction* trans, |
| 79 const Cryptographer* cryptographer, | 75 const Cryptographer* cryptographer, |
| 80 const sessions::ConflictProgress& progress, | 76 const sessions::ConflictProgress& progress, |
| 81 sessions::StatusController* status); | 77 sessions::StatusController* status); |
| 82 | 78 |
| 83 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); | 79 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); |
| 84 }; | 80 }; |
| 85 | 81 |
| 86 } // namespace syncer | 82 } // namespace syncer |
| 87 | 83 |
| 88 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 84 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| OLD | NEW |