From 739cee30e649433720b140e7dcf640fa5234a4f7 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Wed, 20 Jun 2012 20:37:28 +0000 Subject: Convert InvalidationStateTracker to use invalidation::ObjectId instead of syncable::ModelType BUG=124145,124149 TEST=unit tests Review URL: https://chromiumcodereview.appspot.com/10545168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143249 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/notifier/invalidation_util.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sync/notifier/invalidation_util.cc') diff --git a/sync/notifier/invalidation_util.cc b/sync/notifier/invalidation_util.cc index 27bb851..3e680ec 100644 --- a/sync/notifier/invalidation_util.cc +++ b/sync/notifier/invalidation_util.cc @@ -11,9 +11,10 @@ namespace csync { -void RunAndDeleteClosure(invalidation::Closure* task) { - task->Run(); - delete task; +bool ObjectIdLessThan::operator()(const invalidation::ObjectId& lhs, + const invalidation::ObjectId& rhs) const { + return (lhs.source() < rhs.source()) || + (lhs.source() == rhs.source() && lhs.name() < rhs.name()); } bool RealModelTypeToObjectId(syncable::ModelType model_type, -- cgit v1.1