Index: components/sync/driver/backend_migrator.cc |
diff --git a/components/sync_driver/backend_migrator.cc b/components/sync/driver/backend_migrator.cc |
similarity index 90% |
rename from components/sync_driver/backend_migrator.cc |
rename to components/sync/driver/backend_migrator.cc |
index 3398bd57fb433b76213e8e9986ed8859f1cdf034..9b95781d724e366256d6d839ffc7c7e8c66829ac 100644 |
--- a/components/sync_driver/backend_migrator.cc |
+++ b/components/sync/driver/backend_migrator.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "components/sync_driver/backend_migrator.h" |
+#include "components/sync/driver/backend_migrator.h" |
#include "base/location.h" |
#include "base/single_thread_task_runner.h" |
@@ -11,9 +11,9 @@ |
#include "base/tracked_objects.h" |
#include "components/sync/core/configure_reason.h" |
#include "components/sync/core/read_transaction.h" |
+#include "components/sync/driver/sync_service.h" |
#include "components/sync/protocol/sync.pb.h" |
#include "components/sync/syncable/directory.h" // TODO(tim): Bug 131130. |
-#include "components/sync_driver/sync_service.h" |
using syncer::ModelTypeSet; |
@@ -27,15 +27,16 @@ BackendMigrator::BackendMigrator(const std::string& name, |
syncer::UserShare* user_share, |
sync_driver::SyncService* service, |
sync_driver::DataTypeManager* manager, |
- const base::Closure &migration_done_callback) |
- : name_(name), user_share_(user_share), service_(service), |
- manager_(manager), state_(IDLE), |
+ const base::Closure& migration_done_callback) |
+ : name_(name), |
+ user_share_(user_share), |
+ service_(service), |
+ manager_(manager), |
+ state_(IDLE), |
migration_done_callback_(migration_done_callback), |
- weak_ptr_factory_(this) { |
-} |
+ weak_ptr_factory_(this) {} |
-BackendMigrator::~BackendMigrator() { |
-} |
+BackendMigrator::~BackendMigrator() {} |
// Helper macros to log with the syncer thread name; useful when there |
// are multiple syncer threads involved. |
@@ -48,8 +49,8 @@ void BackendMigrator::MigrateTypes(syncer::ModelTypeSet types) { |
const ModelTypeSet old_to_migrate = to_migrate_; |
to_migrate_.PutAll(types); |
SDVLOG(1) << "MigrateTypes called with " << ModelTypeSetToString(types) |
- << ", old_to_migrate = " << ModelTypeSetToString(old_to_migrate) |
- << ", to_migrate_ = " << ModelTypeSetToString(to_migrate_); |
+ << ", old_to_migrate = " << ModelTypeSetToString(old_to_migrate) |
+ << ", to_migrate_ = " << ModelTypeSetToString(to_migrate_); |
if (old_to_migrate == to_migrate_) { |
SDVLOG(1) << "MigrateTypes called with no new types; ignoring"; |
return; |
@@ -124,8 +125,8 @@ namespace { |
syncer::ModelTypeSet GetUnsyncedDataTypes(syncer::UserShare* user_share) { |
syncer::ReadTransaction trans(FROM_HERE, user_share); |
syncer::ModelTypeSet unsynced_data_types; |
- for (int i = syncer::FIRST_REAL_MODEL_TYPE; |
- i < syncer::MODEL_TYPE_COUNT; ++i) { |
+ for (int i = syncer::FIRST_REAL_MODEL_TYPE; i < syncer::MODEL_TYPE_COUNT; |
+ ++i) { |
syncer::ModelType type = syncer::ModelTypeFromInt(i); |
sync_pb::DataTypeProgressMarker progress_marker; |
trans.GetDirectory()->GetDownloadProgress(type, &progress_marker); |
@@ -141,8 +142,8 @@ syncer::ModelTypeSet GetUnsyncedDataTypes(syncer::UserShare* user_share) { |
void BackendMigrator::OnConfigureDoneImpl( |
const sync_driver::DataTypeManager::ConfigureResult& result) { |
SDVLOG(1) << "OnConfigureDone with requested types " |
- << ModelTypeSetToString(result.requested_types) |
- << ", status " << result.status |
+ << ModelTypeSetToString(result.requested_types) << ", status " |
+ << result.status |
<< ", and to_migrate_ = " << ModelTypeSetToString(to_migrate_); |
if (state_ == WAITING_TO_START) { |
if (!TryStart()) |