Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: sync/syncable/model_type.cc

Issue 10735041: Remove syncproto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address most comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/syncable/DEPS ('k') | sync/syncable/syncable_proto_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/model_type.cc
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 1bf1ded295cdceae38f985fc353128f734be6134..4c75f9158c4aaf1598dad6770253a4b4371aa7da 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 {
@@ -145,10 +145,8 @@ 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.
+ModelType GetModelType(const sync_pb::SyncEntity& sync_entity) {
+ DCHECK(!IsRoot(sync_entity)); // Root shouldn't ever go over the wire.
if (sync_entity.deleted())
return UNSPECIFIED;
@@ -164,7 +162,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;
}
« no previous file with comments | « sync/syncable/DEPS ('k') | sync/syncable/syncable_proto_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698