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

Unified Diff: components/sync/syncable/directory_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
« no previous file with comments | « components/sync/syncable/directory_backing_store.cc ('k') | components/sync/syncable/syncable_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/directory_unittest.cc
diff --git a/components/sync/syncable/directory_unittest.cc b/components/sync/syncable/directory_unittest.cc
index 5c6198784f43b84284bce5995e6692dccad9c44d..04a635793c1868d9875a7179201dcb99f483e7a2 100644
--- a/components/sync/syncable/directory_unittest.cc
+++ b/components/sync/syncable/directory_unittest.cc
@@ -78,9 +78,9 @@ DirOpenResult SyncableDirectoryTest::ReopenDirectory() {
// Use a TestDirectoryBackingStore and sql::Connection so we can have test
// data persist across Directory object lifetimes while getting the
// performance benefits of not writing to disk.
- dir_.reset(new Directory(
+ dir_ = base::MakeUnique<Directory>(
new TestDirectoryBackingStore(kDirectoryName, &connection_),
- MakeWeakHandle(handler_.GetWeakPtr()), base::Closure(), NULL, NULL));
+ MakeWeakHandle(handler_.GetWeakPtr()), base::Closure(), nullptr, nullptr);
DirOpenResult open_result =
dir_->Open(kDirectoryName, &delegate_, NullTransactionObserver());
@@ -1695,7 +1695,8 @@ TEST_F(SyncableDirectoryTest, StressTransactions) {
std::unique_ptr<StressTransactionsDelegate> thread_delegates[kThreadCount];
for (int i = 0; i < kThreadCount; ++i) {
- thread_delegates[i].reset(new StressTransactionsDelegate(dir().get(), i));
+ thread_delegates[i] =
+ base::MakeUnique<StressTransactionsDelegate>(dir().get(), i);
ASSERT_TRUE(base::PlatformThread::Create(0, thread_delegates[i].get(),
&threads[i]));
}
« no previous file with comments | « components/sync/syncable/directory_backing_store.cc ('k') | components/sync/syncable/syncable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698