Chromium Code Reviews| Index: sync/engine/syncer_proto_util.cc |
| diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc |
| index 15ab92e1b48c297777000a0a29be7b16b1239425..4befc97b4b77512ed51d5c506e6531fa41e18962 100644 |
| --- a/sync/engine/syncer_proto_util.cc |
| +++ b/sync/engine/syncer_proto_util.cc |
| @@ -534,6 +534,14 @@ bool SyncerProtoUtil::ShouldMaintainPosition( |
| } |
| // static |
| +bool SyncerProtoUtil::ShouldMaintainHierarchy( |
| + const sync_pb::SyncEntity& sync_entity) { |
| + // Maintain hierarchy for bookmarks or top-level items. |
| + return GetModelType(sync_entity) == BOOKMARKS || |
| + sync_entity.parent_id_string() == "0"; |
|
Nicolas Zea
2015/07/29 17:58:09
nit: why check parent id string rather than model
stanisc
2015/07/29 21:37:07
This is for compatibility with some tests that cre
|
| +} |
| + |
| +// static |
| const std::string& SyncerProtoUtil::NameFromSyncEntity( |
| const sync_pb::SyncEntity& entry) { |
| if (entry.has_non_unique_name()) |