| OLD | NEW |
| 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 "sync/test/fake_server/tombstone_entity.h" | 5 #include "sync/test/fake_server/tombstone_entity.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "sync/internal_api/public/base/model_type.h" | 10 #include "sync/internal_api/public/base/model_type.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 TombstoneEntity::TombstoneEntity(const string& id, | 27 TombstoneEntity::TombstoneEntity(const string& id, |
| 28 const ModelType& model_type) | 28 const ModelType& model_type) |
| 29 : FakeServerEntity(id, model_type, 0, string()) { } | 29 : FakeServerEntity(id, model_type, 0, string()) { } |
| 30 | 30 |
| 31 string TombstoneEntity::GetParentId() const { | 31 string TombstoneEntity::GetParentId() const { |
| 32 return string(); | 32 return string(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 sync_pb::SyncEntity* TombstoneEntity::SerializeAsProto() { | 35 void TombstoneEntity::SerializeAsProto(sync_pb::SyncEntity* proto) { |
| 36 sync_pb::SyncEntity* sync_entity = new sync_pb::SyncEntity(); | 36 FakeServerEntity::SerializeBaseProtoFields(proto); |
| 37 FakeServerEntity::SerializeBaseProtoFields(sync_entity); | |
| 38 | 37 |
| 39 sync_pb::EntitySpecifics* specifics = sync_entity->mutable_specifics(); | 38 sync_pb::EntitySpecifics* specifics = proto->mutable_specifics(); |
| 40 AddDefaultFieldValue(FakeServerEntity::GetModelType(), specifics); | 39 AddDefaultFieldValue(FakeServerEntity::GetModelType(), specifics); |
| 41 | |
| 42 return sync_entity; | |
| 43 } | 40 } |
| 44 | 41 |
| 45 bool TombstoneEntity::IsDeleted() const { | 42 bool TombstoneEntity::IsDeleted() const { |
| 46 return true; | 43 return true; |
| 47 } | 44 } |
| 48 | 45 |
| 49 bool TombstoneEntity::IsFolder() const { | 46 bool TombstoneEntity::IsFolder() const { |
| 50 return false; | 47 return false; |
| 51 } | 48 } |
| 52 | 49 |
| 53 } // namespace fake_server | 50 } // namespace fake_server |
| OLD | NEW |