| Index: components/sync/test/fake_server/permanent_entity.cc
|
| diff --git a/components/sync/test/fake_server/permanent_entity.cc b/components/sync/test/fake_server/permanent_entity.cc
|
| index 8183fa6da0314827c15cc7ccd7c8e1198a8992b6..93c7c1041d925a67bde21e57cd97466c4cc8382e 100644
|
| --- a/components/sync/test/fake_server/permanent_entity.cc
|
| +++ b/components/sync/test/fake_server/permanent_entity.cc
|
| @@ -24,14 +24,16 @@ std::unique_ptr<FakeServerEntity> PermanentEntity::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 PermanentEntity must have a server tag.";
|
| - CHECK(!name.empty()) << "The entity must have a non-empty name.";
|
| - CHECK(!parent_server_tag.empty()) << "A PermanentEntity 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 PermanentEntity must have a server tag.
|
| + CHECK(!server_tag.empty());
|
| + // The entity must have a non-empty name.
|
| + CHECK(!name.empty());
|
| + // A PermanentEntity 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 = FakeServerEntity::CreateId(model_type, server_tag);
|
| string parent_id = FakeServerEntity::CreateId(model_type, parent_server_tag);
|
| @@ -44,8 +46,8 @@ std::unique_ptr<FakeServerEntity> PermanentEntity::Create(
|
| // static
|
| std::unique_ptr<FakeServerEntity> PermanentEntity::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 = FakeServerEntity::GetTopLevelId(model_type);
|
| @@ -60,8 +62,8 @@ std::unique_ptr<FakeServerEntity> PermanentEntity::CreateUpdatedNigoriEntity(
|
| const sync_pb::SyncEntity& client_entity,
|
| const FakeServerEntity& current_server_entity) {
|
| ModelType model_type = current_server_entity.model_type();
|
| - 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<FakeServerEntity>(new PermanentEntity(
|
| current_server_entity.id(), model_type, current_server_entity.GetName(),
|
|
|