| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/engine/get_commit_ids_command.h" | 5 #include "chrome/browser/sync/engine/get_commit_ids_command.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 if (cryptographer) { | 42 if (cryptographer) { |
| 43 encrypted_types_ = cryptographer->GetEncryptedTypes(); | 43 encrypted_types_ = cryptographer->GetEncryptedTypes(); |
| 44 passphrase_missing_ = cryptographer->has_pending_keys(); | 44 passphrase_missing_ = cryptographer->has_pending_keys(); |
| 45 }; | 45 }; |
| 46 // We filter out all unready entries from the set of unsynced handles to | 46 // We filter out all unready entries from the set of unsynced handles to |
| 47 // ensure we don't trigger useless sync cycles attempting to retry due to | 47 // ensure we don't trigger useless sync cycles attempting to retry due to |
| 48 // there being work to do. (see ScheduleNextSync in sync_scheduler) | 48 // there being work to do. (see ScheduleNextSync in sync_scheduler) |
| 49 FilterUnreadyEntries(session->write_transaction(), | 49 FilterUnreadyEntries(session->write_transaction(), |
| 50 &all_unsynced_handles); | 50 &all_unsynced_handles); |
| 51 | 51 |
| 52 StatusController* status = session->status_controller(); | 52 StatusController* status = session->mutable_status_controller(); |
| 53 status->set_unsynced_handles(all_unsynced_handles); | 53 status->set_unsynced_handles(all_unsynced_handles); |
| 54 BuildCommitIds(status->unsynced_handles(), session->write_transaction(), | 54 BuildCommitIds(status->unsynced_handles(), session->write_transaction(), |
| 55 session->routing_info()); | 55 session->routing_info()); |
| 56 | 56 |
| 57 const vector<syncable::Id>& verified_commit_ids = | 57 const vector<syncable::Id>& verified_commit_ids = |
| 58 ordered_commit_set_->GetAllCommitIds(); | 58 ordered_commit_set_->GetAllCommitIds(); |
| 59 | 59 |
| 60 for (size_t i = 0; i < verified_commit_ids.size(); i++) | 60 for (size_t i = 0; i < verified_commit_ids.size(); i++) |
| 61 VLOG(1) << "Debug commit batch result:" << verified_commit_ids[i]; | 61 VLOG(1) << "Debug commit batch result:" << verified_commit_ids[i]; |
| 62 | 62 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // delete trees. | 325 // delete trees. |
| 326 | 326 |
| 327 // Add moves and creates, and prepend their uncommitted parents. | 327 // Add moves and creates, and prepend their uncommitted parents. |
| 328 AddCreatesAndMoves(unsynced_handles, write_transaction, routes); | 328 AddCreatesAndMoves(unsynced_handles, write_transaction, routes); |
| 329 | 329 |
| 330 // Add all deletes. | 330 // Add all deletes. |
| 331 AddDeletes(unsynced_handles, write_transaction); | 331 AddDeletes(unsynced_handles, write_transaction); |
| 332 } | 332 } |
| 333 | 333 |
| 334 } // namespace browser_sync | 334 } // namespace browser_sync |
| OLD | NEW |