| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/api/sync_data.h" | 5 #include "sync/api/sync_data.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "sync/internal_api/public/base_node.h" | 13 #include "sync/internal_api/public/base_node.h" |
| 14 #include "sync/internal_api/public/syncable/model_type.h" | 14 #include "sync/internal_api/public/syncable/model_type.h" |
| 15 #include "sync/protocol/proto_value_conversions.h" | 15 #include "sync/protocol/proto_value_conversions.h" |
| 16 #include "sync/protocol/sync.pb.h" | 16 #include "sync/protocol/sync.pb.h" |
| 17 | 17 |
| 18 namespace csync { |
| 19 |
| 18 void SyncData::ImmutableSyncEntityTraits::InitializeWrapper( | 20 void SyncData::ImmutableSyncEntityTraits::InitializeWrapper( |
| 19 Wrapper* wrapper) { | 21 Wrapper* wrapper) { |
| 20 *wrapper = new sync_pb::SyncEntity(); | 22 *wrapper = new sync_pb::SyncEntity(); |
| 21 } | 23 } |
| 22 | 24 |
| 23 void SyncData::ImmutableSyncEntityTraits::DestroyWrapper( | 25 void SyncData::ImmutableSyncEntityTraits::DestroyWrapper( |
| 24 Wrapper* wrapper) { | 26 Wrapper* wrapper) { |
| 25 delete *wrapper; | 27 delete *wrapper; |
| 26 } | 28 } |
| 27 | 29 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 133 } |
| 132 | 134 |
| 133 std::string id = base::Int64ToString(GetRemoteId()); | 135 std::string id = base::Int64ToString(GetRemoteId()); |
| 134 return "{ isLocal: false, type: " + type + ", specifics: " + specifics + | 136 return "{ isLocal: false, type: " + type + ", specifics: " + specifics + |
| 135 ", id: " + id + "}"; | 137 ", id: " + id + "}"; |
| 136 } | 138 } |
| 137 | 139 |
| 138 void PrintTo(const SyncData& sync_data, std::ostream* os) { | 140 void PrintTo(const SyncData& sync_data, std::ostream* os) { |
| 139 *os << sync_data.ToString(); | 141 *os << sync_data.ToString(); |
| 140 } | 142 } |
| 143 |
| 144 } // namespace csync |
| OLD | NEW |