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

Side by Side Diff: components/sync/engine_impl/get_commit_ids.cc

Issue 2258873003: [Sync] Move sessions/ to engine/cycle/ and rename things to match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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
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 "components/sync/engine_impl/get_commit_ids.h" 5 #include "components/sync/engine_impl/get_commit_ids.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 std::vector<int64_t>* out); 51 std::vector<int64_t>* out);
52 52
53 } // namespace 53 } // namespace
54 54
55 void GetCommitIdsForType(syncable::BaseTransaction* trans, 55 void GetCommitIdsForType(syncable::BaseTransaction* trans,
56 ModelType type, 56 ModelType type,
57 size_t max_entries, 57 size_t max_entries,
58 syncable::Directory::Metahandles* out) { 58 syncable::Directory::Metahandles* out) {
59 syncable::Directory* dir = trans->directory(); 59 syncable::Directory* dir = trans->directory();
60 60
61 // Gather the full set of unsynced items and store it in the session. They 61 // Gather the full set of unsynced items and store it in the cycle. They
62 // are not in the correct order for commit. 62 // are not in the correct order for commit.
63 std::set<int64_t> ready_unsynced_set; 63 std::set<int64_t> ready_unsynced_set;
64 syncable::Directory::Metahandles all_unsynced_handles; 64 syncable::Directory::Metahandles all_unsynced_handles;
65 GetUnsyncedEntries(trans, &all_unsynced_handles); 65 GetUnsyncedEntries(trans, &all_unsynced_handles);
66 66
67 ModelTypeSet encrypted_types; 67 ModelTypeSet encrypted_types;
68 bool passphrase_missing = false; 68 bool passphrase_missing = false;
69 Cryptographer* cryptographer = dir->GetCryptographer(trans); 69 Cryptographer* cryptographer = dir->GetCryptographer(trans);
70 if (cryptographer) { 70 if (cryptographer) {
71 encrypted_types = dir->GetNigoriHandler()->GetEncryptedTypes(trans); 71 encrypted_types = dir->GetNigoriHandler()->GetEncryptedTypes(trans);
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 // Add moves and creates, and prepend their uncommitted parents. 572 // Add moves and creates, and prepend their uncommitted parents.
573 traversal.AddCreatesAndMoves(ready_unsynced_set); 573 traversal.AddCreatesAndMoves(ready_unsynced_set);
574 574
575 // Add all deletes. 575 // Add all deletes.
576 traversal.AddDeletes(ready_unsynced_set); 576 traversal.AddDeletes(ready_unsynced_set);
577 } 577 }
578 578
579 } // namespace 579 } // namespace
580 580
581 } // namespace syncer 581 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/directory_update_handler_unittest.cc ('k') | components/sync/engine_impl/get_updates_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698