| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_USS_MIGRATOR_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_USS_MIGRATOR_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "components/sync/base/model_type.h" |
| 10 |
| 11 namespace syncer { |
| 12 |
| 13 class ModelTypeWorker; |
| 14 struct UserShare; |
| 15 |
| 16 typedef base::Callback<bool(ModelType, UserShare*, ModelTypeWorker*)> |
| 17 UssMigrator; |
| 18 |
| 19 // Pulls all the data for |type| out of the directory and sends it to |worker| |
| 20 // as the result of an initial GetUpdates. Returns whether migration succeeded. |
| 21 bool MigrateDirectoryData(ModelType type, |
| 22 UserShare* user_share, |
| 23 ModelTypeWorker* worker); |
| 24 |
| 25 // A version of the above with |batch_size| as a parameter so it can be lowered |
| 26 // for unit testing. |
| 27 bool MigrateDirectoryDataWithBatchSize(ModelType type, |
| 28 UserShare* user_share, |
| 29 ModelTypeWorker* worker, |
| 30 int batch_size); |
| 31 |
| 32 } // namespace syncer |
| 33 |
| 34 #endif // COMPONENTS_SYNC_ENGINE_IMPL_USS_MIGRATOR_H_ |
| OLD | NEW |