| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/sync/model/fake_model_type_service.h" | 5 #include "components/sync/model/fake_model_type_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 300 |
| 301 ConflictResolution FakeModelTypeService::ResolveConflict( | 301 ConflictResolution FakeModelTypeService::ResolveConflict( |
| 302 const EntityData& local_data, | 302 const EntityData& local_data, |
| 303 const EntityData& remote_data) const { | 303 const EntityData& remote_data) const { |
| 304 DCHECK(conflict_resolution_); | 304 DCHECK(conflict_resolution_); |
| 305 return std::move(*conflict_resolution_); | 305 return std::move(*conflict_resolution_); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void FakeModelTypeService::SetConflictResolution( | 308 void FakeModelTypeService::SetConflictResolution( |
| 309 ConflictResolution resolution) { | 309 ConflictResolution resolution) { |
| 310 conflict_resolution_.reset(new ConflictResolution(std::move(resolution))); | 310 conflict_resolution_ = |
| 311 base::MakeUnique<ConflictResolution>(std::move(resolution)); |
| 311 } | 312 } |
| 312 | 313 |
| 313 void FakeModelTypeService::SetServiceError(SyncError::ErrorType error_type) { | 314 void FakeModelTypeService::SetServiceError(SyncError::ErrorType error_type) { |
| 314 DCHECK(!service_error_.IsSet()); | 315 DCHECK(!service_error_.IsSet()); |
| 315 service_error_ = SyncError(FROM_HERE, error_type, "TestError", PREFERENCES); | 316 service_error_ = SyncError(FROM_HERE, error_type, "TestError", PREFERENCES); |
| 316 } | 317 } |
| 317 | 318 |
| 318 void FakeModelTypeService::CheckPostConditions() { | 319 void FakeModelTypeService::CheckPostConditions() { |
| 319 DCHECK(!service_error_.IsSet()); | 320 DCHECK(!service_error_.IsSet()); |
| 320 } | 321 } |
| 321 | 322 |
| 322 } // namespace syncer | 323 } // namespace syncer |
| OLD | NEW |