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

Side by Side Diff: components/sync/model/fake_model_type_service.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/sync/model/attachments/attachment_service_proxy_unittest.cc ('k') | components/sync/model/sync_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698