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

Side by Side Diff: sync/engine/get_commit_ids.cc

Issue 1142423006: Sync: fixed Implicit Permanent Folders issues found when testing with alpha server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bumped protocol version Created 5 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 | « no previous file | sync/protocol/sync.proto » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/engine/get_commit_ids.h" 5 #include "sync/engine/get_commit_ids.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 bool Traversal::IsFull() const { 447 bool Traversal::IsFull() const {
448 return out_->size() >= max_entries_; 448 return out_->size() >= max_entries_;
449 } 449 }
450 450
451 bool Traversal::HaveItem(int64 handle) const { 451 bool Traversal::HaveItem(int64 handle) const {
452 return added_handles_.find(handle) != added_handles_.end(); 452 return added_handles_.find(handle) != added_handles_.end();
453 } 453 }
454 454
455 bool Traversal::SupportsHierarchy(const syncable::Entry& item) const { 455 bool Traversal::SupportsHierarchy(const syncable::Entry& item) const {
456 return !item.GetParentId().IsNull(); 456 // Types with explicit server supported hierarchy only.
457 return IsTypeWithServerGeneratedRoot(item.GetModelType());
457 } 458 }
458 459
459 void Traversal::AppendManyToTraversal( 460 void Traversal::AppendManyToTraversal(
460 const syncable::Directory::Metahandles& handles) { 461 const syncable::Directory::Metahandles& handles) {
461 out_->insert(out_->end(), handles.begin(), handles.end()); 462 out_->insert(out_->end(), handles.begin(), handles.end());
462 added_handles_.insert(handles.begin(), handles.end()); 463 added_handles_.insert(handles.begin(), handles.end());
463 } 464 }
464 465
465 void Traversal::AppendToTraversal(int64 metahandle) { 466 void Traversal::AppendToTraversal(int64 metahandle) {
466 out_->push_back(metahandle); 467 out_->push_back(metahandle);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 // Add moves and creates, and prepend their uncommitted parents. 571 // Add moves and creates, and prepend their uncommitted parents.
571 traversal.AddCreatesAndMoves(ready_unsynced_set); 572 traversal.AddCreatesAndMoves(ready_unsynced_set);
572 573
573 // Add all deletes. 574 // Add all deletes.
574 traversal.AddDeletes(ready_unsynced_set); 575 traversal.AddDeletes(ready_unsynced_set);
575 } 576 }
576 577
577 } // namespace 578 } // namespace
578 579
579 } // namespace syncer 580 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | sync/protocol/sync.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698