| Index: components/sync/engine_impl/loopback_server/persistent_bookmark_entity.cc
|
| diff --git a/components/sync/engine_impl/loopback_server/persistent_bookmark_entity.cc b/components/sync/engine_impl/loopback_server/persistent_bookmark_entity.cc
|
| index 16728a982e583de692cb9484ca1c423c50bc4246..ad3da2f5bf18db60de742fa12ce509f14582485a 100644
|
| --- a/components/sync/engine_impl/loopback_server/persistent_bookmark_entity.cc
|
| +++ b/components/sync/engine_impl/loopback_server/persistent_bookmark_entity.cc
|
| @@ -34,8 +34,10 @@ std::unique_ptr<LoopbackServerEntity> PersistentBookmarkEntity::CreateNew(
|
| const sync_pb::SyncEntity& client_entity,
|
| const string& parent_id,
|
| const string& client_guid) {
|
| - CHECK(client_entity.version() == 0) << "New entities must have version = 0.";
|
| - CHECK(IsBookmark(client_entity)) << "The given entity must be a bookmark.";
|
| + // New entities must have version = 0.
|
| + CHECK_EQ(client_entity.version(), 0);
|
| + // The given entity must be a bookmark.
|
| + CHECK(IsBookmark(client_entity));
|
|
|
| const string id =
|
| LoopbackServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID());
|
| @@ -55,9 +57,10 @@ PersistentBookmarkEntity::CreateUpdatedVersion(
|
| const sync_pb::SyncEntity& client_entity,
|
| const LoopbackServerEntity& current_server_entity,
|
| const string& parent_id) {
|
| - CHECK(client_entity.version() != 0) << "Existing entities must not have a "
|
| - << "version = 0.";
|
| - CHECK(IsBookmark(client_entity)) << "The given entity must be a bookmark.";
|
| + // Existing entities must not have a version = 0.
|
| + CHECK_NE(client_entity.version(), 0);
|
| + // The given entity must be a bookmark.
|
| + CHECK(IsBookmark(client_entity));
|
|
|
| const PersistentBookmarkEntity& current_bookmark_entity =
|
| static_cast<const PersistentBookmarkEntity&>(current_server_entity);
|
| @@ -77,7 +80,8 @@ PersistentBookmarkEntity::CreateUpdatedVersion(
|
| std::unique_ptr<LoopbackServerEntity>
|
| PersistentBookmarkEntity::CreateFromEntity(
|
| const sync_pb::SyncEntity& client_entity) {
|
| - CHECK(IsBookmark(client_entity)) << "The given entity must be a bookmark.";
|
| + // The given entity must be a bookmark.
|
| + CHECK(IsBookmark(client_entity));
|
|
|
| return std::unique_ptr<LoopbackServerEntity>(new PersistentBookmarkEntity(
|
| client_entity.id_string(), client_entity.version(), client_entity.name(),
|
|
|