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

Unified Diff: sync/syncable/model_type.cc

Issue 10735041: Remove syncproto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve DCHECKing, fix tests 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698