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

Side by Side Diff: components/sync/test/fake_server/tombstone_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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/test/fake_server/tombstone_entity.h" 5 #include "components/sync/test/fake_server/tombstone_entity.h"
6 6
7 using std::string; 7 using std::string;
8 using syncer::ModelType; 8 using syncer::ModelType;
9 9
10 namespace fake_server { 10 namespace fake_server {
11 11
12 TombstoneEntity::~TombstoneEntity() {} 12 TombstoneEntity::~TombstoneEntity() {}
13 13
14 // static 14 // static
15 std::unique_ptr<FakeServerEntity> TombstoneEntity::Create( 15 std::unique_ptr<FakeServerEntity> TombstoneEntity::Create(
16 const string& id, 16 const string& id,
17 const string& client_defined_unique_tag) { 17 const string& client_defined_unique_tag) {
18 const ModelType model_type = GetModelTypeFromId(id); 18 const ModelType model_type = GetModelTypeFromId(id);
19 CHECK_NE(model_type, syncer::UNSPECIFIED) << "Invalid ID was given: " << id; 19 // Invalid ID was given.
20 CHECK_NE(model_type, syncer::UNSPECIFIED);
20 return std::unique_ptr<FakeServerEntity>( 21 return std::unique_ptr<FakeServerEntity>(
21 new TombstoneEntity(id, client_defined_unique_tag, model_type)); 22 new TombstoneEntity(id, client_defined_unique_tag, model_type));
22 } 23 }
23 24
24 TombstoneEntity::TombstoneEntity(const string& id, 25 TombstoneEntity::TombstoneEntity(const string& id,
25 const string& client_defined_unique_tag, 26 const string& client_defined_unique_tag,
26 const ModelType& model_type) 27 const ModelType& model_type)
27 : FakeServerEntity(id, client_defined_unique_tag, model_type, 0, string()) { 28 : FakeServerEntity(id, client_defined_unique_tag, model_type, 0, string()) {
28 sync_pb::EntitySpecifics specifics; 29 sync_pb::EntitySpecifics specifics;
29 AddDefaultFieldValue(model_type, &specifics); 30 AddDefaultFieldValue(model_type, &specifics);
(...skipping 10 matching lines...) Expand all
40 41
41 void TombstoneEntity::SerializeAsProto(sync_pb::SyncEntity* proto) const { 42 void TombstoneEntity::SerializeAsProto(sync_pb::SyncEntity* proto) const {
42 FakeServerEntity::SerializeBaseProtoFields(proto); 43 FakeServerEntity::SerializeBaseProtoFields(proto);
43 } 44 }
44 45
45 bool TombstoneEntity::IsDeleted() const { 46 bool TombstoneEntity::IsDeleted() const {
46 return true; 47 return true;
47 } 48 }
48 49
49 } // namespace fake_server 50 } // namespace fake_server
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698