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

Side by Side Diff: sync/internal_api/change_reorder_buffer.cc

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/change_record.cc ('k') | sync/internal_api/debug_info_event_listener.h » ('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 (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/internal_api/change_reorder_buffer.h" 5 #include "sync/internal_api/change_reorder_buffer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 record.extra = extra_data_[record.id]; 147 record.extra = extra_data_[record.id];
148 changelist.push_back(record); 148 changelist.push_back(record);
149 } else { 149 } else {
150 traversal.ExpandToInclude(trans, i->first); 150 traversal.ExpandToInclude(trans, i->first);
151 if (i->second == OP_ADD || 151 if (i->second == OP_ADD ||
152 i->second == OP_UPDATE_POSITION_AND_PROPERTIES) { 152 i->second == OP_UPDATE_POSITION_AND_PROPERTIES) {
153 ReadNode node(sync_trans); 153 ReadNode node(sync_trans);
154 CHECK_EQ(BaseNode::INIT_OK, node.InitByIdLookup(i->first)); 154 CHECK_EQ(BaseNode::INIT_OK, node.InitByIdLookup(i->first));
155 155
156 // We only care about parents of entry's with position-sensitive models. 156 // We only care about parents of entry's with position-sensitive models.
157 if (syncer::ShouldMaintainPosition(node.GetEntry()->GetModelType())) { 157 if (ShouldMaintainPosition(node.GetEntry()->GetModelType())) {
158 parents_of_position_changes.insert(node.GetParentId()); 158 parents_of_position_changes.insert(node.GetParentId());
159 } 159 }
160 } 160 }
161 } 161 }
162 } 162 }
163 163
164 // Step 2: Breadth-first expansion of the traversal, enumerating children in 164 // Step 2: Breadth-first expansion of the traversal, enumerating children in
165 // the syncable sibling order if there were any position updates. 165 // the syncable sibling order if there were any position updates.
166 queue<int64> to_visit; 166 queue<int64> to_visit;
167 to_visit.push(traversal.top()); 167 to_visit.push(traversal.top());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 id = child.Get(syncable::NEXT_ID); 219 id = child.Get(syncable::NEXT_ID);
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 *changes = ImmutableChangeRecordList(&changelist); 224 *changes = ImmutableChangeRecordList(&changelist);
225 return true; 225 return true;
226 } 226 }
227 227
228 } // namespace syncer 228 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/change_record.cc ('k') | sync/internal_api/debug_info_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698