Index: components/sync/driver/shared_change_processor.cc |
diff --git a/components/sync_driver/shared_change_processor.cc b/components/sync/driver/shared_change_processor.cc |
similarity index 79% |
rename from components/sync_driver/shared_change_processor.cc |
rename to components/sync/driver/shared_change_processor.cc |
index eee40d2bcf03afefe2df900977698378fdf39dc5..51471c141c18f56cbf0db1c65df63f80acba6015 100644 |
--- a/components/sync_driver/shared_change_processor.cc |
+++ b/components/sync/driver/shared_change_processor.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/shared_change_processor.h" |
+#include "components/sync/driver/shared_change_processor.h" |
#include <utility> |
@@ -10,9 +10,9 @@ |
#include "components/sync/api/sync_change.h" |
#include "components/sync/api/syncable_service.h" |
#include "components/sync/core/data_type_error_handler.h" |
-#include "components/sync_driver/generic_change_processor.h" |
-#include "components/sync_driver/generic_change_processor_factory.h" |
-#include "components/sync_driver/sync_client.h" |
+#include "components/sync/driver/generic_change_processor.h" |
+#include "components/sync/driver/generic_change_processor_factory.h" |
+#include "components/sync/driver/sync_client.h" |
using base::AutoLock; |
@@ -27,8 +27,7 @@ SharedChangeProcessor::SharedChangeProcessor() |
type_(syncer::UNSPECIFIED), |
frontend_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
generic_change_processor_(NULL), |
- error_handler_(NULL) { |
-} |
+ error_handler_(NULL) {} |
SharedChangeProcessor::~SharedChangeProcessor() { |
// We can either be deleted when the DTC is destroyed (on UI |
@@ -74,13 +73,11 @@ base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect( |
return base::WeakPtr<syncer::SyncableService>(); |
} |
- generic_change_processor_ = |
- processor_factory->CreateGenericChangeProcessor(type, |
- user_share, |
- error_handler, |
- local_service, |
- merge_result, |
- sync_client).release(); |
+ generic_change_processor_ = processor_factory |
+ ->CreateGenericChangeProcessor( |
+ type, user_share, error_handler, |
+ local_service, merge_result, sync_client) |
+ .release(); |
// If available, propagate attachment service to the syncable service. |
std::unique_ptr<syncer::AttachmentService> attachment_service = |
generic_change_processor_->GetAttachmentService(); |
@@ -124,14 +121,12 @@ syncer::SyncError SharedChangeProcessor::ProcessSyncChanges( |
if (disconnected_) { |
// The DTC that disconnects us must ensure it posts a StopSyncing task. |
// If we reach this, it means it just hasn't executed yet. |
- syncer::SyncError error(FROM_HERE, |
- syncer::SyncError::DATATYPE_ERROR, |
- "Change processor disconnected.", |
- type_); |
+ syncer::SyncError error(FROM_HERE, syncer::SyncError::DATATYPE_ERROR, |
+ "Change processor disconnected.", type_); |
return error; |
} |
- return generic_change_processor_->ProcessSyncChanges( |
- from_here, list_of_changes); |
+ return generic_change_processor_->ProcessSyncChanges(from_here, |
+ list_of_changes); |
} |
syncer::SyncDataList SharedChangeProcessor::GetAllSyncData( |
@@ -148,10 +143,8 @@ syncer::SyncError SharedChangeProcessor::GetAllSyncDataReturnError( |
DCHECK(backend_task_runner_->BelongsToCurrentThread()); |
AutoLock lock(monitor_lock_); |
if (disconnected_) { |
- syncer::SyncError error(FROM_HERE, |
- syncer::SyncError::DATATYPE_ERROR, |
- "Change processor disconnected.", |
- type_); |
+ syncer::SyncError error(FROM_HERE, syncer::SyncError::DATATYPE_ERROR, |
+ "Change processor disconnected.", type_); |
return error; |
} |
return generic_change_processor_->GetAllSyncDataReturnError(data); |
@@ -165,14 +158,12 @@ syncer::SyncError SharedChangeProcessor::UpdateDataTypeContext( |
DCHECK(backend_task_runner_->BelongsToCurrentThread()); |
AutoLock lock(monitor_lock_); |
if (disconnected_) { |
- syncer::SyncError error(FROM_HERE, |
- syncer::SyncError::DATATYPE_ERROR, |
- "Change processor disconnected.", |
- type_); |
+ syncer::SyncError error(FROM_HERE, syncer::SyncError::DATATYPE_ERROR, |
+ "Change processor disconnected.", type_); |
return error; |
} |
- return generic_change_processor_->UpdateDataTypeContext( |
- type, refresh_status, context); |
+ return generic_change_processor_->UpdateDataTypeContext(type, refresh_status, |
+ context); |
} |
bool SharedChangeProcessor::SyncModelHasUserCreatedNodes(bool* has_nodes) { |
@@ -215,10 +206,8 @@ syncer::SyncError SharedChangeProcessor::CreateAndUploadError( |
if (!disconnected_) { |
return error_handler_->CreateAndUploadError(location, message, type_); |
} else { |
- return syncer::SyncError(location, |
- syncer::SyncError::DATATYPE_ERROR, |
- message, |
- type_); |
+ return syncer::SyncError(location, syncer::SyncError::DATATYPE_ERROR, |
+ message, type_); |
} |
} |