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

Unified Diff: components/sync/model_impl/model_type_store_backend_unittest.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 side-by-side diff with in-line comments
Download patch
Index: components/sync/model_impl/model_type_store_backend_unittest.cc
diff --git a/components/sync/model_impl/model_type_store_backend_unittest.cc b/components/sync/model_impl/model_type_store_backend_unittest.cc
index bbc8e121d18a7280064683d61ed8b506516ec2fd..34f7e734247256ed34f590d0ae91c24252424c2d 100644
--- a/components/sync/model_impl/model_type_store_backend_unittest.cc
+++ b/components/sync/model_impl/model_type_store_backend_unittest.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/leveldatabase/src/include/leveldb/env.h"
#include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
@@ -124,7 +125,7 @@ TEST_F(ModelTypeStoreBackendTest, ReadDeletedRecord) {
ASSERT_TRUE(missing_id_list.empty());
// Delete one record.
- write_batch.reset(new leveldb::WriteBatch());
+ write_batch = base::MakeUnique<leveldb::WriteBatch>();
write_batch->Delete("prefix:id2");
result = backend->WriteModifications(std::move(write_batch));
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
« no previous file with comments | « components/sync/model_impl/attachments/task_queue_unittest.cc ('k') | components/sync/model_impl/model_type_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698