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

Unified Diff: components/sync/engine_impl/loopback_server/persistent_permanent_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_permanent_entity.cc
diff --git a/components/sync/engine_impl/loopback_server/persistent_permanent_entity.cc b/components/sync/engine_impl/loopback_server/persistent_permanent_entity.cc
index decea55998e14bf19fe273db197bd365098b5b22..8a29ba5fcb45e9c11fb08b3ce0668295703cb5dc 100644
--- a/components/sync/engine_impl/loopback_server/persistent_permanent_entity.cc
+++ b/components/sync/engine_impl/loopback_server/persistent_permanent_entity.cc
@@ -33,16 +33,16 @@ std::unique_ptr<LoopbackServerEntity> PersistentPermanentEntity::Create(
const string& server_tag,
const string& name,
const string& parent_server_tag) {
- CHECK(model_type != syncer::UNSPECIFIED) << "The entity's ModelType is "
- << "invalid.";
- CHECK(!server_tag.empty())
- << "A PersistentPermanentEntity must have a server tag.";
- CHECK(!name.empty()) << "The entity must have a non-empty name.";
- CHECK(!parent_server_tag.empty())
- << "A PersistentPermanentEntity must have a parent "
- << "server tag.";
- CHECK(parent_server_tag != kRootParentTag) << "Top-level entities should not "
- << "be created with this factory.";
+ // The entity's ModelType is invalid.
+ CHECK(model_type != syncer::UNSPECIFIED);
+ // A PersistentPermanentEntity must have a server tag.
+ CHECK(!server_tag.empty());
+ // The entity must have a non-empty name.
+ CHECK(!name.empty());
+ // A PersistentPermanentEntity must have a parent server tag.
+ CHECK(!parent_server_tag.empty());
+ // Top-level entities should not be created with this factory.
+ CHECK(parent_server_tag != kRootParentTag);
string id = LoopbackServerEntity::CreateId(model_type, server_tag);
string parent_id =
@@ -56,8 +56,8 @@ std::unique_ptr<LoopbackServerEntity> PersistentPermanentEntity::Create(
// static
std::unique_ptr<LoopbackServerEntity> PersistentPermanentEntity::CreateTopLevel(
const ModelType& model_type) {
- CHECK(model_type != syncer::UNSPECIFIED) << "The entity's ModelType is "
- << "invalid.";
+ // The entity's ModelType is invalid.
+ CHECK(model_type != syncer::UNSPECIFIED);
string server_tag = syncer::ModelTypeToRootTag(model_type);
string name = syncer::ModelTypeToString(model_type);
string id = LoopbackServerEntity::GetTopLevelId(model_type);
@@ -73,8 +73,8 @@ PersistentPermanentEntity::CreateUpdatedNigoriEntity(
const sync_pb::SyncEntity& client_entity,
const LoopbackServerEntity& current_server_entity) {
ModelType model_type = current_server_entity.GetModelType();
- CHECK(model_type == syncer::NIGORI) << "This factory only supports NIGORI "
- << "entities.";
+ // This factory only supports NIGORI entities.
+ CHECK(model_type == syncer::NIGORI);
return base::WrapUnique<LoopbackServerEntity>(new PersistentPermanentEntity(
current_server_entity.GetId(), current_server_entity.GetVersion(),

Powered by Google App Engine
This is Rietveld 408576698