Index: sync/syncable/entry_kernel.cc |
diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc |
index 52481f2f9d7ca3e3b81befb73b19e2fd3bc66e85..d73acafd850f76d58590ed2a70cb17fe976b0fb9 100644 |
--- a/sync/syncable/entry_kernel.cc |
+++ b/sync/syncable/entry_kernel.cc |
@@ -52,16 +52,16 @@ ModelType EntryKernel::GetServerModelType() const { |
bool EntryKernel::ShouldMaintainPosition() const { |
// We maintain positions for all bookmarks, except those that are |
// server-created top-level folders. |
- return (GetModelTypeFromSpecifics(ref(SPECIFICS)) == syncer::BOOKMARKS) |
- && !(!ref(UNIQUE_SERVER_TAG).empty() && ref(IS_DIR)); |
+ return TypeSupportsOrdering(GetModelTypeFromSpecifics(ref(SPECIFICS))) && |
+ !(!ref(UNIQUE_SERVER_TAG).empty() && ref(IS_DIR)); |
} |
bool EntryKernel::ShouldMaintainHierarchy() const { |
// We maintain hierarchy for bookmarks and top-level folders, |
// but no other types. Note that the Nigori node consists of a single |
// top-level folder, so it's included in this set. |
- return (GetModelTypeFromSpecifics(ref(SPECIFICS)) == syncer::BOOKMARKS) |
- || (!ref(UNIQUE_SERVER_TAG).empty()); |
+ return TypeSupportsHierarchy(GetModelTypeFromSpecifics(ref(SPECIFICS))) || |
+ (!ref(UNIQUE_SERVER_TAG).empty()); |
} |
namespace { |
@@ -148,7 +148,10 @@ base::DictionaryValue* EntryKernel::ToValue( |
Cryptographer* cryptographer) const { |
base::DictionaryValue* kernel_info = new base::DictionaryValue(); |
kernel_info->SetBoolean("isDirty", is_dirty()); |
- kernel_info->Set("serverModelType", ModelTypeToValue(GetServerModelType())); |
+ ModelType dataType = GetServerModelType(); |
+ if (!IsRealDataType(dataType)) |
+ dataType = GetModelType(); |
+ kernel_info->Set("modelType", ModelTypeToValue(dataType)); |
// Int64 fields. |
SetFieldValues(*this, kernel_info, |