Chromium Code Reviews| Index: sync/syncable/model_type.cc |
| diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc |
| index 1bf1ded295cdceae38f985fc353128f734be6134..4eb203c53e88f3de69c98234a8aad043ec38a9c3 100644 |
| --- a/sync/syncable/model_type.cc |
| +++ b/sync/syncable/model_type.cc |
| @@ -6,7 +6,6 @@ |
| #include "base/string_split.h" |
| #include "base/values.h" |
| -#include "sync/engine/syncproto.h" |
| #include "sync/protocol/app_notification_specifics.pb.h" |
| #include "sync/protocol/app_setting_specifics.pb.h" |
| #include "sync/protocol/app_specifics.pb.h" |
| @@ -22,6 +21,7 @@ |
| #include "sync/protocol/sync.pb.h" |
| #include "sync/protocol/theme_specifics.pb.h" |
| #include "sync/protocol/typed_url_specifics.pb.h" |
| +#include "sync/syncable/syncable_proto_util.h" |
| namespace syncer { |
| @@ -146,9 +146,9 @@ int GetSpecificsFieldNumberFromModelType(ModelType model_type) { |
| // Note: keep this consistent with GetModelType in syncable.cc! |
| ModelType GetModelType(const sync_pb::SyncEntity& sync_pb_entity) { |
| - const syncer::SyncEntity& sync_entity = |
| - static_cast<const syncer::SyncEntity&>(sync_pb_entity); |
| - DCHECK(!sync_entity.id().IsRoot()); // Root shouldn't ever go over the wire. |
| + const sync_pb::SyncEntity& sync_entity = |
| + static_cast<const sync_pb::SyncEntity&>(sync_pb_entity); |
|
akalin
2012/07/11 01:42:22
static cast
rlarocque
2012/07/11 19:22:16
Done.
|
| + DCHECK(!IsRoot(sync_entity)); // Root shouldn't ever go over the wire. |
| if (sync_entity.deleted()) |
| return UNSPECIFIED; |
| @@ -164,7 +164,7 @@ ModelType GetModelType(const sync_pb::SyncEntity& sync_pb_entity) { |
| // Loose check for server-created top-level folders that aren't |
| // bound to a particular model type. |
| if (!sync_entity.server_defined_unique_tag().empty() && |
| - sync_entity.IsFolder()) { |
| + IsFolder(sync_entity)) { |
| return TOP_LEVEL_FOLDER; |
| } |