Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1376)

Side by Side Diff: sync/syncable/entry.h

Issue 14667013: sync: Better iteration in GenericChangeProcessor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sync/internal_api/public/base_node.h ('k') | sync/syncable/entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 111
112 // Returns a vector of this node's children's handles.
113 // Clears |result| if there are no children. If this node is of a type that
114 // supports user-defined ordering then the resulting vector will be in the
115 // proper order.
116 void GetChildHandles(std::vector<int64>* result) const;
117
112 inline bool ExistsOnClientBecauseNameIsNonEmpty() const { 118 inline bool ExistsOnClientBecauseNameIsNonEmpty() const {
113 DCHECK(kernel_); 119 DCHECK(kernel_);
114 return !kernel_->ref(NON_UNIQUE_NAME).empty(); 120 return !kernel_->ref(NON_UNIQUE_NAME).empty();
115 } 121 }
116 122
117 inline bool IsRoot() const { 123 inline bool IsRoot() const {
118 DCHECK(kernel_); 124 DCHECK(kernel_);
119 return kernel_->ref(ID).IsRoot(); 125 return kernel_->ref(ID).IsRoot();
120 } 126 }
121 127
(...skipping 30 matching lines...) Expand all
152 158
153 DISALLOW_COPY_AND_ASSIGN(Entry); 159 DISALLOW_COPY_AND_ASSIGN(Entry);
154 }; 160 };
155 161
156 std::ostream& operator<<(std::ostream& os, const Entry& entry); 162 std::ostream& operator<<(std::ostream& os, const Entry& entry);
157 163
158 } // namespace syncable 164 } // namespace syncable
159 } // namespace syncer 165 } // namespace syncer
160 166
161 #endif // SYNC_SYNCABLE_ENTRY_H_ 167 #endif // SYNC_SYNCABLE_ENTRY_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/base_node.h ('k') | sync/syncable/entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698