| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "components/sync/engine_impl/update_applicator.h" | 5 #include "components/sync/engine_impl/update_applicator.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "components/sync/engine_impl/syncer_util.h" | 12 #include "components/sync/engine_impl/syncer_util.h" |
| 13 #include "components/sync/syncable/entry.h" | 13 #include "components/sync/syncable/entry.h" |
| 14 #include "components/sync/syncable/mutable_entry.h" | 14 #include "components/sync/syncable/mutable_entry.h" |
| 15 #include "components/sync/syncable/syncable_id.h" | 15 #include "components/sync/syncable/syncable_id.h" |
| 16 #include "components/sync/syncable/syncable_write_transaction.h" | 16 #include "components/sync/syncable/syncable_write_transaction.h" |
| 17 | 17 |
| 18 using std::vector; | 18 using std::vector; |
| 19 | 19 |
| 20 namespace syncer { | 20 namespace syncer { |
| 21 | 21 |
| 22 using syncable::ID; | 22 using syncer::syncable::ID; |
| 23 | 23 |
| 24 UpdateApplicator::UpdateApplicator(Cryptographer* cryptographer) | 24 UpdateApplicator::UpdateApplicator(Cryptographer* cryptographer) |
| 25 : cryptographer_(cryptographer), | 25 : cryptographer_(cryptographer), |
| 26 updates_applied_(0), | 26 updates_applied_(0), |
| 27 encryption_conflicts_(0), | 27 encryption_conflicts_(0), |
| 28 hierarchy_conflicts_(0) {} | 28 hierarchy_conflicts_(0) {} |
| 29 | 29 |
| 30 UpdateApplicator::~UpdateApplicator() {} | 30 UpdateApplicator::~UpdateApplicator() {} |
| 31 | 31 |
| 32 // Attempt to apply all updates, using multiple passes if necessary. | 32 // Attempt to apply all updates, using multiple passes if necessary. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // We made some progress, so prepare for what might be another iteration. | 89 // We made some progress, so prepare for what might be another iteration. |
| 90 // If everything went well, to_reapply will be empty and we'll break out on | 90 // If everything went well, to_reapply will be empty and we'll break out on |
| 91 // the while condition. | 91 // the while condition. |
| 92 to_apply.swap(to_reapply); | 92 to_apply.swap(to_reapply); |
| 93 to_reapply.clear(); | 93 to_reapply.clear(); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace syncer | 97 } // namespace syncer |
| OLD | NEW |