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

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

Issue 2233153002: IndexedDB: WrapUnique(new T(args..)) -> MakeUnique<T>(args...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_database.cc
diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc
index e6b6bea2c10688acc963be327f68006717e49fd5..f2e2f2154d3774bfb9b3d07b4076ca5d490db611 100644
--- a/content/browser/indexed_db/indexed_db_database.cc
+++ b/content/browser/indexed_db/indexed_db_database.cc
@@ -796,13 +796,13 @@ void IndexedDBDatabase::FilterObservation(IndexedDBTransaction* transaction,
continue;
if (!recorded) {
if (type == blink::WebIDBClear) {
- transaction->AddObservation(connection->id(),
- base::WrapUnique(new IndexedDBObservation(
- object_store_id, type)));
+ transaction->AddObservation(
+ connection->id(),
+ base::MakeUnique<IndexedDBObservation>(object_store_id, type));
} else {
transaction->AddObservation(connection->id(),
- base::WrapUnique(new IndexedDBObservation(
- object_store_id, type, key_range)));
+ base::MakeUnique<IndexedDBObservation>(
+ object_store_id, type, key_range));
}
recorded = true;
}
@@ -1172,13 +1172,12 @@ static std::unique_ptr<IndexedDBKey> GenerateKey(
&current_number);
if (!s.ok()) {
LOG(ERROR) << "Failed to GetKeyGeneratorCurrentNumber";
- return base::WrapUnique(new IndexedDBKey());
+ return base::MakeUnique<IndexedDBKey>();
}
if (current_number < 0 || current_number > max_generator_value)
- return base::WrapUnique(new IndexedDBKey());
+ return base::MakeUnique<IndexedDBKey>();
- return base::WrapUnique(
- new IndexedDBKey(current_number, WebIDBKeyTypeNumber));
+ return base::MakeUnique<IndexedDBKey>(current_number, WebIDBKeyTypeNumber);
}
static leveldb::Status UpdateKeyGenerator(IndexedDBBackingStore* backing_store,

Powered by Google App Engine
This is Rietveld 408576698