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

Unified Diff: content/browser/indexed_db/indexed_db_transaction_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_transaction_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction_unittest.cc b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
index 7073d120c3c025f04d30f839f105fdbba0272512..0308cbb453699147e09298321ccf8073ef9fadee 100644
--- a/content/browser/indexed_db/indexed_db_transaction_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
@@ -89,7 +89,8 @@ TEST_F(IndexedDBTransactionTest, Timeout) {
const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope,
blink::WebIDBTransactionModeReadWrite,
@@ -132,7 +133,8 @@ TEST_F(IndexedDBTransactionTest, NoTimeoutReadOnly) {
const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope, blink::WebIDBTransactionModeReadOnly,
new IndexedDBFakeBackingStore::FakeTransaction(commit_success));
@@ -162,7 +164,8 @@ TEST_P(IndexedDBTransactionTestMode, ScheduleNormalTask) {
const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope, GetParam(),
new IndexedDBFakeBackingStore::FakeTransaction(commit_success));
@@ -222,7 +225,8 @@ TEST_F(IndexedDBTransactionTest, SchedulePreemptiveTask) {
const std::set<int64_t> scope;
const leveldb::Status commit_failure = leveldb::Status::Corruption("Ouch.");
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope,
blink::WebIDBTransactionModeVersionChange,
@@ -282,7 +286,8 @@ TEST_P(IndexedDBTransactionTestMode, AbortTasks) {
const std::set<int64_t> scope;
const leveldb::Status commit_failure = leveldb::Status::Corruption("Ouch.");
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope, GetParam(),
new IndexedDBFakeBackingStore::FakeTransaction(commit_failure));
@@ -310,7 +315,8 @@ TEST_P(IndexedDBTransactionTestMode, AbortPreemptive) {
const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope, GetParam(),
new IndexedDBFakeBackingStore::FakeTransaction(commit_success));
@@ -359,7 +365,8 @@ TEST_F(IndexedDBTransactionTest, IndexedDBObserver) {
const std::set<int64_t> scope;
const leveldb::Status commit_success = leveldb::Status::OK();
std::unique_ptr<IndexedDBConnection> connection(
- new IndexedDBConnection(db_, new MockIndexedDBDatabaseCallbacks()));
+ base::MakeUnique<IndexedDBConnection>(
+ db_, new MockIndexedDBDatabaseCallbacks()));
scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
id, connection->GetWeakPtr(), scope,
blink::WebIDBTransactionModeReadWrite,
« no previous file with comments | « content/browser/indexed_db/indexed_db_transaction.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698