| 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_change.h" | 5 #include "sync/api/sync_change.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 namespace csync { |
| 10 |
| 9 SyncChange::SyncChange() : change_type_(ACTION_INVALID) { | 11 SyncChange::SyncChange() : change_type_(ACTION_INVALID) { |
| 10 } | 12 } |
| 11 | 13 |
| 12 SyncChange::SyncChange(SyncChangeType change_type, const SyncData& sync_data) | 14 SyncChange::SyncChange(SyncChangeType change_type, const SyncData& sync_data) |
| 13 : change_type_(change_type), | 15 : change_type_(change_type), |
| 14 sync_data_(sync_data) { | 16 sync_data_(sync_data) { |
| 15 DCHECK(IsValid()); | 17 DCHECK(IsValid()); |
| 16 } | 18 } |
| 17 | 19 |
| 18 SyncChange::~SyncChange() {} | 20 SyncChange::~SyncChange() {} |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 66 } |
| 65 | 67 |
| 66 std::string SyncChange::ToString() const { | 68 std::string SyncChange::ToString() const { |
| 67 return "{ changeType: " + ChangeTypeToString(change_type_) + | 69 return "{ changeType: " + ChangeTypeToString(change_type_) + |
| 68 ", syncData: " + sync_data_.ToString() + "}"; | 70 ", syncData: " + sync_data_.ToString() + "}"; |
| 69 } | 71 } |
| 70 | 72 |
| 71 void PrintTo(const SyncChange& sync_change, std::ostream* os) { | 73 void PrintTo(const SyncChange& sync_change, std::ostream* os) { |
| 72 *os << sync_change.ToString(); | 74 *os << sync_change.ToString(); |
| 73 } | 75 } |
| 76 |
| 77 } // namespace csync |
| OLD | NEW |