summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/syncproto.h
diff options
context:
space:
mode:
authornick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 01:05:38 +0000
committernick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 01:05:38 +0000
commitf753af6865f1724c3e5adde6917bb2b1f24713ce (patch)
tree35a5185cbadcbf66625fb438f893bba4e806ef68 /chrome/browser/sync/engine/syncproto.h
parent3d8a66ab748a0bcb5126b1466d311ad62db4d94d (diff)
downloadchromium_src-f753af6865f1724c3e5adde6917bb2b1f24713ce.zip
chromium_src-f753af6865f1724c3e5adde6917bb2b1f24713ce.tar.gz
chromium_src-f753af6865f1724c3e5adde6917bb2b1f24713ce.tar.bz2
Hook up client side of per-datatype GetUpdates.
Which datatypes are fetched is dictated by the ModelSafeRoutingInfo. We change the semantic of the ModelSafeRoutingInfo so that datatypes which should not be synced are not in the map. We will do GetUpdates for GROUP_PASSIVE datatypes. BUG=29905 TEST=included unit tests Review URL: http://codereview.chromium.org/594024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38726 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncproto.h')
-rw-r--r--chrome/browser/sync/engine/syncproto.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/chrome/browser/sync/engine/syncproto.h b/chrome/browser/sync/engine/syncproto.h
index c34a709..b412bea 100644
--- a/chrome/browser/sync/engine/syncproto.h
+++ b/chrome/browser/sync/engine/syncproto.h
@@ -53,29 +53,8 @@ class SyncEntity : public IdWrapper<sync_pb::SyncEntity> {
(has_bookmarkdata() && bookmarkdata().bookmark_folder()));
}
- // Note: keep this consistent with GetModelType in syncable.cc!
syncable::ModelType GetModelType() const {
- DCHECK(!id().IsRoot()); // Root shouldn't ever go over the wire.
-
- if (deleted())
- return syncable::UNSPECIFIED;
-
- if (specifics().HasExtension(sync_pb::bookmark) || has_bookmarkdata())
- return syncable::BOOKMARKS;
-
- if (specifics().HasExtension(sync_pb::preference))
- return syncable::PREFERENCES;
-
- // Loose check for server-created top-level folders that aren't
- // bound to a particular model type.
- if (!server_defined_unique_tag().empty() && IsFolder())
- return syncable::TOP_LEVEL_FOLDER;
-
- // This is an item of a datatype we can't understand. Maybe it's
- // from the future? Either we mis-encoded the object, or the
- // server sent us entries it shouldn't have.
- NOTREACHED() << "Unknown datatype in sync proto.";
- return syncable::UNSPECIFIED;
+ return syncable::GetModelType(*this);
}
};