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