| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |