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

Unified Diff: content/browser/indexed_db/indexed_db_unittest.cc

Issue 2233153002: IndexedDB: WrapUnique(new T(args..)) -> MakeUnique<T>(args...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 4 years, 4 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: content/browser/indexed_db/indexed_db_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index 88ceb265df21b922cb8d5af2be37dd8dc30e8fb4..a4b1f8ce6d78a01ae50eca000023ad7272f6c271 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -136,7 +136,7 @@ class ForceCloseDBCallbacks : public IndexedDBCallbacks {
public:
ForceCloseDBCallbacks(scoped_refptr<IndexedDBContextImpl> idb_context,
const Origin& origin)
- : IndexedDBCallbacks(NULL, 0, 0),
+ : IndexedDBCallbacks(nullptr, 0, 0),
idb_context_(idb_context),
origin_(origin) {}
@@ -194,18 +194,18 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnDelete) {
test_path = idb_context->GetFilePathForTesting(kTestOrigin);
std::unique_ptr<IndexedDBPendingConnection> open_connection(
- new IndexedDBPendingConnection(
+ base::MakeUnique<IndexedDBPendingConnection>(
open_callbacks, open_db_callbacks, 0 /* child_process_id */,
0 /* host_transaction_id */, 0 /* version */));
factory->Open(base::ASCIIToUTF16("opendb"), std::move(open_connection),
- NULL /* request_context */, Origin(kTestOrigin),
+ nullptr /* request_context */, Origin(kTestOrigin),
idb_context->data_path());
std::unique_ptr<IndexedDBPendingConnection> closed_connection(
- new IndexedDBPendingConnection(
+ base::MakeUnique<IndexedDBPendingConnection>(
closed_callbacks, closed_db_callbacks, 0 /* child_process_id */,
0 /* host_transaction_id */, 0 /* version */));
factory->Open(base::ASCIIToUTF16("closeddb"), std::move(closed_connection),
- NULL /* request_context */, Origin(kTestOrigin),
+ nullptr /* request_context */, Origin(kTestOrigin),
idb_context->data_path());
closed_callbacks->connection()->Close();
@@ -273,11 +273,11 @@ TEST_F(IndexedDBTest, ForceCloseOpenDatabasesOnCommitFailure) {
new MockIndexedDBDatabaseCallbacks());
const int64_t transaction_id = 1;
std::unique_ptr<IndexedDBPendingConnection> connection(
- new IndexedDBPendingConnection(
+ base::MakeUnique<IndexedDBPendingConnection>(
callbacks, db_callbacks, 0 /* child_process_id */, transaction_id,
IndexedDBDatabaseMetadata::DEFAULT_VERSION));
factory->Open(base::ASCIIToUTF16("db"), std::move(connection),
- NULL /* request_context */, Origin(kTestOrigin),
+ nullptr /* request_context */, Origin(kTestOrigin),
temp_dir.path());
EXPECT_TRUE(callbacks->connection());
« no previous file with comments | « content/browser/indexed_db/indexed_db_transaction_unittest.cc ('k') | content/browser/indexed_db/leveldb/leveldb_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698