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

Side by Side Diff: components/sync/model_impl/model_type_store_impl.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_impl/model_type_store_impl.h" 5 #include "components/sync/model_impl/model_type_store_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 DCHECK(CalledOnValidThread()); 328 DCHECK(CalledOnValidThread());
329 GetLeveldbWriteBatch(write_batch)->Delete(FormatMetadataKey(id)); 329 GetLeveldbWriteBatch(write_batch)->Delete(FormatMetadataKey(id));
330 } 330 }
331 331
332 void ModelTypeStoreImpl::DeleteGlobalMetadata(WriteBatch* write_batch) { 332 void ModelTypeStoreImpl::DeleteGlobalMetadata(WriteBatch* write_batch) {
333 DCHECK(CalledOnValidThread()); 333 DCHECK(CalledOnValidThread());
334 GetLeveldbWriteBatch(write_batch)->Delete(kGlobalMetadataKey); 334 GetLeveldbWriteBatch(write_batch)->Delete(kGlobalMetadataKey);
335 } 335 }
336 336
337 ModelTypeStoreImpl::WriteBatchImpl::WriteBatchImpl() { 337 ModelTypeStoreImpl::WriteBatchImpl::WriteBatchImpl() {
338 leveldb_write_batch_.reset(new leveldb::WriteBatch()); 338 leveldb_write_batch_ = base::MakeUnique<leveldb::WriteBatch>();
339 } 339 }
340 340
341 ModelTypeStoreImpl::WriteBatchImpl::~WriteBatchImpl() {} 341 ModelTypeStoreImpl::WriteBatchImpl::~WriteBatchImpl() {}
342 342
343 } // namespace syncer 343 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698