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 #ifndef SYNC_SYNCABLE_ENTRY_H_ | 5 #ifndef SYNC_SYNCABLE_ENTRY_H_ |
6 #define SYNC_SYNCABLE_ENTRY_H_ | 6 #define SYNC_SYNCABLE_ENTRY_H_ |
7 | 7 |
8 #include "sync/base/sync_export.h" | 8 #include "sync/base/sync_export.h" |
9 #include "sync/syncable/entry_kernel.h" | 9 #include "sync/syncable/entry_kernel.h" |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 DCHECK(kernel_); | 101 DCHECK(kernel_); |
102 return kernel_->ref(field); | 102 return kernel_->ref(field); |
103 } | 103 } |
104 | 104 |
105 ModelType GetServerModelType() const; | 105 ModelType GetServerModelType() const; |
106 ModelType GetModelType() const; | 106 ModelType GetModelType() const; |
107 | 107 |
108 Id GetPredecessorId() const; | 108 Id GetPredecessorId() const; |
109 Id GetSuccessorId() const; | 109 Id GetSuccessorId() const; |
110 Id GetFirstChildId() const; | 110 Id GetFirstChildId() const; |
| 111 int GetTotalNodeCount() const; |
111 | 112 |
112 inline bool ExistsOnClientBecauseNameIsNonEmpty() const { | 113 inline bool ExistsOnClientBecauseNameIsNonEmpty() const { |
113 DCHECK(kernel_); | 114 DCHECK(kernel_); |
114 return !kernel_->ref(NON_UNIQUE_NAME).empty(); | 115 return !kernel_->ref(NON_UNIQUE_NAME).empty(); |
115 } | 116 } |
116 | 117 |
117 inline bool IsRoot() const { | 118 inline bool IsRoot() const { |
118 DCHECK(kernel_); | 119 DCHECK(kernel_); |
119 return kernel_->ref(ID).IsRoot(); | 120 return kernel_->ref(ID).IsRoot(); |
120 } | 121 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 153 |
153 DISALLOW_COPY_AND_ASSIGN(Entry); | 154 DISALLOW_COPY_AND_ASSIGN(Entry); |
154 }; | 155 }; |
155 | 156 |
156 std::ostream& operator<<(std::ostream& os, const Entry& entry); | 157 std::ostream& operator<<(std::ostream& os, const Entry& entry); |
157 | 158 |
158 } // namespace syncable | 159 } // namespace syncable |
159 } // namespace syncer | 160 } // namespace syncer |
160 | 161 |
161 #endif // SYNC_SYNCABLE_ENTRY_H_ | 162 #endif // SYNC_SYNCABLE_ENTRY_H_ |
OLD | NEW |