| 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 "components/sync/engine_impl/loopback_server/loopback_server_entity.h" | 5 #include "components/sync/engine_impl/loopback_server/loopback_server_entity.h" |
| 6 | 6 |
| 7 #include <stdint.h> | |
| 8 | |
| 9 #include <limits> | 7 #include <limits> |
| 10 #include <memory> | |
| 11 #include <string> | |
| 12 #include <vector> | 8 #include <vector> |
| 13 | 9 |
| 14 #include "base/guid.h" | 10 #include "base/guid.h" |
| 15 #include "base/logging.h" | 11 #include "base/logging.h" |
| 16 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 17 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 18 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
| 20 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 21 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
| 22 #include "components/sync/base/model_type.h" | |
| 23 #include "components/sync/engine_impl/loopback_server/persistent_bookmark_entity
.h" | 18 #include "components/sync/engine_impl/loopback_server/persistent_bookmark_entity
.h" |
| 24 #include "components/sync/engine_impl/loopback_server/persistent_permanent_entit
y.h" | 19 #include "components/sync/engine_impl/loopback_server/persistent_permanent_entit
y.h" |
| 25 #include "components/sync/engine_impl/loopback_server/persistent_tombstone_entit
y.h" | 20 #include "components/sync/engine_impl/loopback_server/persistent_tombstone_entit
y.h" |
| 26 #include "components/sync/engine_impl/loopback_server/persistent_unique_client_e
ntity.h" | 21 #include "components/sync/engine_impl/loopback_server/persistent_unique_client_e
ntity.h" |
| 27 #include "components/sync/protocol/sync.pb.h" | |
| 28 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
| 29 #include "net/http/http_status_code.h" | 23 #include "net/http/http_status_code.h" |
| 30 | 24 |
| 31 using std::string; | 25 using std::string; |
| 32 using std::vector; | 26 using std::vector; |
| 33 | 27 |
| 34 using syncer::ModelType; | 28 using syncer::ModelType; |
| 35 | 29 |
| 36 namespace { | 30 namespace { |
| 37 // The separator used when formatting IDs. | 31 // The separator used when formatting IDs. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 169 } |
| 176 | 170 |
| 177 void LoopbackServerEntity::SerializeAsLoopbackServerEntity( | 171 void LoopbackServerEntity::SerializeAsLoopbackServerEntity( |
| 178 sync_pb::LoopbackServerEntity* entity) const { | 172 sync_pb::LoopbackServerEntity* entity) const { |
| 179 entity->set_type(GetLoopbackServerEntityType()); | 173 entity->set_type(GetLoopbackServerEntityType()); |
| 180 entity->set_model_type(static_cast<int64_t>(GetModelType())); | 174 entity->set_model_type(static_cast<int64_t>(GetModelType())); |
| 181 SerializeAsProto(entity->mutable_entity()); | 175 SerializeAsProto(entity->mutable_entity()); |
| 182 } | 176 } |
| 183 | 177 |
| 184 } // namespace syncer | 178 } // namespace syncer |
| OLD | NEW |