Chromium Code Reviews| 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 // | |
| 5 // Utility functions that act on syncable::MutableEntry to resolve conflicts. | |
| 6 | 4 |
| 7 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_CONFLICT_UTIL_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_CONFLICT_UTIL_H_ |
| 8 #define COMPONENTS_SYNC_ENGINE_IMPL_CONFLICT_UTIL_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_CONFLICT_UTIL_H_ |
| 9 | 7 |
| 10 namespace syncer { | 8 namespace syncer { |
| 11 | 9 |
| 12 namespace syncable { | 10 namespace syncable { |
| 13 class MutableEntry; | 11 class MutableEntry; |
| 14 } | 12 } |
| 15 | 13 |
| 16 namespace conflict_util { | 14 namespace conflict_util { |
| 17 | 15 |
| 16 // Utility functions that act on syncable::MutableEntry to resolve conflicts. | |
|
maxbogue
2016/10/17 23:59:46
Could probably put this right above the namespace?
skym
2016/10/18 14:39:08
Done.
| |
| 17 | |
| 18 // Marks the item as no longer requiring sync, allowing the server's version | 18 // Marks the item as no longer requiring sync, allowing the server's version |
| 19 // to 'win' during the next update application step. | 19 // to 'win' during the next update application step. |
| 20 void IgnoreLocalChanges(syncable::MutableEntry* entry); | 20 void IgnoreLocalChanges(syncable::MutableEntry* entry); |
| 21 | 21 |
| 22 // Marks the item as no longer requiring update from server data. This will | 22 // Marks the item as no longer requiring update from server data. This will |
| 23 // cause the item to be committed to the server, overwriting the server's | 23 // cause the item to be committed to the server, overwriting the server's |
| 24 // version. | 24 // version. |
| 25 void OverwriteServerChanges(syncable::MutableEntry* entry); | 25 void OverwriteServerChanges(syncable::MutableEntry* entry); |
| 26 | 26 |
| 27 // The local and server versions are identical, so unset the bits that put them | 27 // The local and server versions are identical, so unset the bits that put them |
| 28 // into a conflicting state. | 28 // into a conflicting state. |
| 29 void IgnoreConflict(syncable::MutableEntry* trans); | 29 void IgnoreConflict(syncable::MutableEntry* trans); |
| 30 | 30 |
| 31 } // namespace conflict_util | 31 } // namespace conflict_util |
| 32 } // namespace syncer | 32 } // namespace syncer |
| 33 | 33 |
| 34 #endif // COMPONENTS_SYNC_ENGINE_IMPL_CONFLICT_UTIL_H_ | 34 #endif // COMPONENTS_SYNC_ENGINE_IMPL_CONFLICT_UTIL_H_ |
| OLD | NEW |