summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/syncable_service_adapter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync/glue/syncable_service_adapter.cc')
-rw-r--r--chrome/browser/sync/glue/syncable_service_adapter.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/chrome/browser/sync/glue/syncable_service_adapter.cc b/chrome/browser/sync/glue/syncable_service_adapter.cc
index 68dcfae..88b6ab1 100644
--- a/chrome/browser/sync/glue/syncable_service_adapter.cc
+++ b/chrome/browser/sync/glue/syncable_service_adapter.cc
@@ -30,18 +30,26 @@ SyncableServiceAdapter::~SyncableServiceAdapter() {
}
}
-bool SyncableServiceAdapter::AssociateModels() {
+bool SyncableServiceAdapter::AssociateModels(SyncError* error) {
syncing_ = true;
SyncDataList initial_sync_data;
- if (!sync_processor_->GetSyncDataForType(type_, &initial_sync_data)) {
+ SyncError temp_error =
+ sync_processor_->GetSyncDataForType(type_, &initial_sync_data);
+ if (temp_error.IsSet()) {
+ *error = temp_error;
return false;
}
- return service_->MergeDataAndStartSyncing(type_,
- initial_sync_data,
- sync_processor_);
+ temp_error = service_->MergeDataAndStartSyncing(type_,
+ initial_sync_data,
+ sync_processor_);
+ if (temp_error.IsSet()) {
+ *error = temp_error;
+ return false;
+ }
+ return true;
}
-bool SyncableServiceAdapter::DisassociateModels() {
+bool SyncableServiceAdapter::DisassociateModels(SyncError* error) {
service_->StopSyncing(type_);
syncing_ = false;
return true;