OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/entry.h" | 5 #include "sync/syncable/entry.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "base/json/string_escape.h" | 9 #include "base/json/string_escape.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 Id Entry::GetSuccessorId() const { | 99 Id Entry::GetSuccessorId() const { |
100 return dir()->GetSuccessorId(kernel_); | 100 return dir()->GetSuccessorId(kernel_); |
101 } | 101 } |
102 | 102 |
103 Id Entry::GetFirstChildId() const { | 103 Id Entry::GetFirstChildId() const { |
104 return dir()->GetFirstChildId(basetrans_, kernel_); | 104 return dir()->GetFirstChildId(basetrans_, kernel_); |
105 } | 105 } |
106 | 106 |
| 107 int Entry::GetTotalNodeCount() const { |
| 108 return dir()->GetTotalNodeCount(basetrans_, kernel_); |
| 109 } |
| 110 |
107 bool Entry::ShouldMaintainPosition() const { | 111 bool Entry::ShouldMaintainPosition() const { |
108 return kernel_->ShouldMaintainPosition(); | 112 return kernel_->ShouldMaintainPosition(); |
109 } | 113 } |
110 | 114 |
111 std::ostream& operator<<(std::ostream& s, const Blob& blob) { | 115 std::ostream& operator<<(std::ostream& s, const Blob& blob) { |
112 for (Blob::const_iterator i = blob.begin(); i != blob.end(); ++i) | 116 for (Blob::const_iterator i = blob.begin(); i != blob.end(); ++i) |
113 s << std::hex << std::setw(2) | 117 s << std::hex << std::setw(2) |
114 << std::setfill('0') << static_cast<unsigned int>(*i); | 118 << std::setfill('0') << static_cast<unsigned int>(*i); |
115 return s << std::dec; | 119 return s << std::dec; |
116 } | 120 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 os << "TempFlags: "; | 159 os << "TempFlags: "; |
156 for ( ; i < BIT_TEMPS_END; ++i) { | 160 for ( ; i < BIT_TEMPS_END; ++i) { |
157 if (kernel->ref(static_cast<BitTemp>(i))) | 161 if (kernel->ref(static_cast<BitTemp>(i))) |
158 os << "#" << i - BIT_TEMPS_BEGIN << ", "; | 162 os << "#" << i - BIT_TEMPS_BEGIN << ", "; |
159 } | 163 } |
160 return os; | 164 return os; |
161 } | 165 } |
162 | 166 |
163 } // namespace syncable | 167 } // namespace syncable |
164 } // namespace syncer | 168 } // namespace syncer |
OLD | NEW |