| 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/syncable/syncable_id.h" | 5 #include "sync/syncable/syncable_id.h" |
| 6 | 6 |
| 7 #include <iosfwd> | 7 #include <iosfwd> |
| 8 | 8 |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 | 10 |
| 11 using std::ostream; | 11 using std::ostream; |
| 12 using std::string; | 12 using std::string; |
| 13 | 13 |
| 14 namespace syncer { |
| 14 namespace syncable { | 15 namespace syncable { |
| 15 | 16 |
| 16 ostream& operator<<(ostream& out, const Id& id) { | 17 ostream& operator<<(ostream& out, const Id& id) { |
| 17 out << id.s_; | 18 out << id.s_; |
| 18 return out; | 19 return out; |
| 19 } | 20 } |
| 20 | 21 |
| 21 StringValue* Id::ToValue() const { | 22 StringValue* Id::ToValue() const { |
| 22 return Value::CreateStringValue(s_); | 23 return Value::CreateStringValue(s_); |
| 23 } | 24 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 Id id; | 62 Id id; |
| 62 id.s_.clear(); | 63 id.s_.clear(); |
| 63 return id; | 64 return id; |
| 64 } | 65 } |
| 65 | 66 |
| 66 Id GetNullId() { | 67 Id GetNullId() { |
| 67 return Id(); // Currently == root. | 68 return Id(); // Currently == root. |
| 68 } | 69 } |
| 69 | 70 |
| 70 } // namespace syncable | 71 } // namespace syncable |
| 72 } // namespace syncer |
| OLD | NEW |