| 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/fake_server_entity.h" | 5 #include "sync/test/fake_server/fake_server_entity.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 | 52 |
| 53 void FakeServerEntity::SetVersion(int64 version) { | 53 void FakeServerEntity::SetVersion(int64 version) { |
| 54 version_ = version; | 54 version_ = version; |
| 55 } | 55 } |
| 56 | 56 |
| 57 const std::string& FakeServerEntity::GetName() const { | 57 const std::string& FakeServerEntity::GetName() const { |
| 58 return name_; | 58 return name_; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void FakeServerEntity::SetName(std::string name) { | 61 void FakeServerEntity::SetName(const std::string& name) { |
| 62 name_ = name; | 62 name_ = name; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void FakeServerEntity::SetSpecifics( | 65 void FakeServerEntity::SetSpecifics( |
| 66 const sync_pb::EntitySpecifics& updated_specifics) { | 66 const sync_pb::EntitySpecifics& updated_specifics) { |
| 67 specifics_ = updated_specifics; | 67 specifics_ = updated_specifics; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool FakeServerEntity::IsDeleted() const { | 70 bool FakeServerEntity::IsDeleted() const { |
| 71 return false; | 71 return false; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 sync_entity->set_id_string(id_); | 127 sync_entity->set_id_string(id_); |
| 128 sync_entity->set_version(version_); | 128 sync_entity->set_version(version_); |
| 129 sync_entity->set_name(name_); | 129 sync_entity->set_name(name_); |
| 130 | 130 |
| 131 // Data via accessors | 131 // Data via accessors |
| 132 sync_entity->set_deleted(IsDeleted()); | 132 sync_entity->set_deleted(IsDeleted()); |
| 133 sync_entity->set_folder(IsFolder()); | 133 sync_entity->set_folder(IsFolder()); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace fake_server | 136 } // namespace fake_server |
| OLD | NEW |