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

Unified Diff: components/sync/syncable/syncable_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_unittest.cc ('k') | components/sync/syncable/test_user_share.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/syncable_unittest.cc
diff --git a/components/sync/syncable/syncable_unittest.cc b/components/sync/syncable/syncable_unittest.cc
index c2df5240d9df3e512c31fa48ca4951314ec38114..9ffb772e876e4d14cc166e585737d1f93b6c3003 100644
--- a/components/sync/syncable/syncable_unittest.cc
+++ b/components/sync/syncable/syncable_unittest.cc
@@ -13,6 +13,7 @@
#include "base/files/scoped_temp_dir.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "base/synchronization/condition_variable.h"
@@ -342,10 +343,10 @@ TEST_F(OnDiskSyncableDirectoryTest,
}
dir()->SaveChanges();
- dir().reset(
- new Directory(new OnDiskDirectoryBackingStore(kDirectoryName, file_path_),
- MakeWeakHandle(unrecoverable_error_handler()->GetWeakPtr()),
- base::Closure(), NULL, NULL));
+ dir() = base::MakeUnique<Directory>(
+ new OnDiskDirectoryBackingStore(kDirectoryName, file_path_),
+ MakeWeakHandle(unrecoverable_error_handler()->GetWeakPtr()),
+ base::Closure(), nullptr, nullptr);
ASSERT_TRUE(dir().get());
ASSERT_EQ(OPENED, dir()->Open(kDirectoryName, directory_change_delegate(),
« no previous file with comments | « components/sync/syncable/directory_unittest.cc ('k') | components/sync/syncable/test_user_share.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698