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

Unified Diff: components/sync/engine_impl/loopback_server/persistent_bookmark_entity.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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: 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(),

Powered by Google App Engine
This is Rietveld 408576698