| 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 #pragma once | 10 #pragma once |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const Cryptographer* cryptographer, | 59 const Cryptographer* cryptographer, |
| 60 const sessions::ConflictProgress& progress, | 60 const sessions::ConflictProgress& progress, |
| 61 sessions::StatusController* status); | 61 sessions::StatusController* status); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 enum ProcessSimpleConflictResult { | 64 enum ProcessSimpleConflictResult { |
| 65 NO_SYNC_PROGRESS, // No changes to advance syncing made. | 65 NO_SYNC_PROGRESS, // No changes to advance syncing made. |
| 66 SYNC_PROGRESS, // Progress made. | 66 SYNC_PROGRESS, // Progress made. |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 void IgnoreLocalChanges(syncable::MutableEntry* entry); | |
| 70 void OverwriteServerChanges(syncable::WriteTransaction* trans, | |
| 71 syncable::MutableEntry* entry); | |
| 72 | |
| 73 ProcessSimpleConflictResult ProcessSimpleConflict( | 69 ProcessSimpleConflictResult ProcessSimpleConflict( |
| 74 syncable::WriteTransaction* trans, | 70 syncable::WriteTransaction* trans, |
| 75 const syncable::Id& id, | 71 const syncable::Id& id, |
| 76 const Cryptographer* cryptographer, | 72 const Cryptographer* cryptographer, |
| 77 sessions::StatusController* status); | 73 sessions::StatusController* status); |
| 78 | 74 |
| 79 bool ResolveSimpleConflicts(syncable::WriteTransaction* trans, | 75 bool ResolveSimpleConflicts(syncable::WriteTransaction* trans, |
| 80 const Cryptographer* cryptographer, | 76 const Cryptographer* cryptographer, |
| 81 const sessions::ConflictProgress& progress, | 77 const sessions::ConflictProgress& progress, |
| 82 sessions::StatusController* status); | 78 sessions::StatusController* status); |
| 83 | 79 |
| 84 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); | 80 DISALLOW_COPY_AND_ASSIGN(ConflictResolver); |
| 85 }; | 81 }; |
| 86 | 82 |
| 87 } // namespace csync | 83 } // namespace csync |
| 88 | 84 |
| 89 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ | 85 #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ |
| OLD | NEW |