| Index: components/sync/driver/ui_data_type_controller.cc
|
| diff --git a/components/sync_driver/ui_data_type_controller.cc b/components/sync/driver/ui_data_type_controller.cc
|
| similarity index 88%
|
| rename from components/sync_driver/ui_data_type_controller.cc
|
| rename to components/sync/driver/ui_data_type_controller.cc
|
| index 89a43173087e903a29694f8086b92c1868305d01..584610ee288be4bb723cbd5b8f10bc6bf254af0c 100644
|
| --- a/components/sync_driver/ui_data_type_controller.cc
|
| +++ b/components/sync/driver/ui_data_type_controller.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/ui_data_type_controller.h"
|
| +#include "components/sync/driver/ui_data_type_controller.h"
|
|
|
| #include <utility>
|
|
|
| @@ -17,10 +17,10 @@
|
| #include "components/sync/api/syncable_service.h"
|
| #include "components/sync/base/data_type_histogram.h"
|
| #include "components/sync/base/model_type.h"
|
| -#include "components/sync_driver/generic_change_processor_factory.h"
|
| -#include "components/sync_driver/shared_change_processor_ref.h"
|
| -#include "components/sync_driver/sync_client.h"
|
| -#include "components/sync_driver/sync_service.h"
|
| +#include "components/sync/driver/generic_change_processor_factory.h"
|
| +#include "components/sync/driver/shared_change_processor_ref.h"
|
| +#include "components/sync/driver/sync_client.h"
|
| +#include "components/sync/driver/sync_service.h"
|
|
|
| namespace sync_driver {
|
|
|
| @@ -62,11 +62,9 @@ void UIDataTypeController::LoadModels(
|
| DCHECK(syncer::IsRealDataType(type_));
|
| model_load_callback_ = model_load_callback;
|
| if (state_ != NOT_RUNNING) {
|
| - model_load_callback.Run(type(),
|
| - syncer::SyncError(FROM_HERE,
|
| - syncer::SyncError::DATATYPE_ERROR,
|
| - "Model already loaded",
|
| - type()));
|
| + model_load_callback.Run(
|
| + type(), syncer::SyncError(FROM_HERE, syncer::SyncError::DATATYPE_ERROR,
|
| + "Model already loaded", type()));
|
| return;
|
| }
|
| // Since we can't be called multiple times before Stop() is called,
|
| @@ -140,14 +138,10 @@ void UIDataTypeController::Associate() {
|
| sync_client_->GetSyncService()->GetUserShare(), this, type(),
|
| weak_ptr_factory.GetWeakPtr());
|
| if (!local_service_.get()) {
|
| - syncer::SyncError error(FROM_HERE,
|
| - syncer::SyncError::DATATYPE_ERROR,
|
| - "Failed to connect to syncer.",
|
| - type());
|
| + syncer::SyncError error(FROM_HERE, syncer::SyncError::DATATYPE_ERROR,
|
| + "Failed to connect to syncer.", type());
|
| local_merge_result.set_error(error);
|
| - StartDone(ASSOCIATION_FAILED,
|
| - local_merge_result,
|
| - syncer_merge_result);
|
| + StartDone(ASSOCIATION_FAILED, local_merge_result, syncer_merge_result);
|
| return;
|
| }
|
|
|
| @@ -157,14 +151,10 @@ void UIDataTypeController::Associate() {
|
| FROM_HERE_WITH_EXPLICIT_FUNCTION(
|
| "471403 UIDataTypeController::Associate2"));
|
| if (!shared_change_processor_->CryptoReadyIfNecessary()) {
|
| - syncer::SyncError error(FROM_HERE,
|
| - syncer::SyncError::CRYPTO_ERROR,
|
| - "",
|
| + syncer::SyncError error(FROM_HERE, syncer::SyncError::CRYPTO_ERROR, "",
|
| type());
|
| local_merge_result.set_error(error);
|
| - StartDone(NEEDS_CRYPTO,
|
| - local_merge_result,
|
| - syncer_merge_result);
|
| + StartDone(NEEDS_CRYPTO, local_merge_result, syncer_merge_result);
|
| return;
|
| }
|
|
|
| @@ -176,14 +166,10 @@ void UIDataTypeController::Associate() {
|
| bool sync_has_nodes = false;
|
| if (!shared_change_processor_->SyncModelHasUserCreatedNodes(
|
| &sync_has_nodes)) {
|
| - syncer::SyncError error(FROM_HERE,
|
| - syncer::SyncError::UNRECOVERABLE_ERROR,
|
| - "Failed to load sync nodes",
|
| - type());
|
| + syncer::SyncError error(FROM_HERE, syncer::SyncError::UNRECOVERABLE_ERROR,
|
| + "Failed to load sync nodes", type());
|
| local_merge_result.set_error(error);
|
| - StartDone(UNRECOVERABLE_ERROR,
|
| - local_merge_result,
|
| - syncer_merge_result);
|
| + StartDone(UNRECOVERABLE_ERROR, local_merge_result, syncer_merge_result);
|
| return;
|
| }
|
|
|
| @@ -248,8 +234,7 @@ void UIDataTypeController::Associate() {
|
| shared_change_processor_->GetSyncCount());
|
|
|
| state_ = RUNNING;
|
| - StartDone(sync_has_nodes ? OK : OK_FIRST_RUN,
|
| - local_merge_result,
|
| + StartDone(sync_has_nodes ? OK : OK_FIRST_RUN, local_merge_result,
|
| syncer_merge_result);
|
| }
|
|
|
| @@ -375,7 +360,7 @@ void UIDataTypeController::OnSingleDataTypeUnrecoverableError(
|
| void UIDataTypeController::RecordAssociationTime(base::TimeDelta time) {
|
| DCHECK(ui_thread_->BelongsToCurrentThread());
|
| #define PER_DATA_TYPE_MACRO(type_str) \
|
| - UMA_HISTOGRAM_TIMES("Sync." type_str "AssociationTime", time);
|
| + UMA_HISTOGRAM_TIMES("Sync." type_str "AssociationTime", time);
|
| SYNC_DATA_TYPE_HISTOGRAM(type());
|
| #undef PER_DATA_TYPE_MACRO
|
| }
|
|
|