Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: components/sync/driver/backend_migrator.cc

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/backend_migrator.h ('k') | components/sync/driver/backend_migrator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « components/sync/driver/backend_migrator.h ('k') | components/sync/driver/backend_migrator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698