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_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 Loading... |
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 |
OLD | NEW |