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

Unified Diff: content/browser/indexed_db/indexed_db_leveldb_coding.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_leveldb_coding.cc
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
index 42188a92a9000ca421459472bcf18a3e153ec6c6..5c8e1cbf0c566ff4146cfc33ec41a6c329fa5895 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
@@ -376,7 +376,7 @@ bool DecodeIDBKey(StringPiece* slice, std::unique_ptr<IndexedDBKey>* value) {
switch (type) {
case kIndexedDBKeyNullTypeByte:
- *value = base::WrapUnique(new IndexedDBKey());
+ *value = base::MakeUnique<IndexedDBKey>();
return true;
case kIndexedDBKeyArrayTypeByte: {
@@ -390,35 +390,35 @@ bool DecodeIDBKey(StringPiece* slice, std::unique_ptr<IndexedDBKey>* value) {
return false;
array.push_back(*key);
}
- *value = base::WrapUnique(new IndexedDBKey(array));
+ *value = base::MakeUnique<IndexedDBKey>(array);
return true;
}
case kIndexedDBKeyBinaryTypeByte: {
std::string binary;
if (!DecodeBinary(slice, &binary))
return false;
- *value = base::WrapUnique(new IndexedDBKey(binary));
+ *value = base::MakeUnique<IndexedDBKey>(binary);
return true;
}
case kIndexedDBKeyStringTypeByte: {
base::string16 s;
if (!DecodeStringWithLength(slice, &s))
return false;
- *value = base::WrapUnique(new IndexedDBKey(s));
+ *value = base::MakeUnique<IndexedDBKey>(s);
return true;
}
case kIndexedDBKeyDateTypeByte: {
double d;
if (!DecodeDouble(slice, &d))
return false;
- *value = base::WrapUnique(new IndexedDBKey(d, WebIDBKeyTypeDate));
+ *value = base::MakeUnique<IndexedDBKey>(d, WebIDBKeyTypeDate);
return true;
}
case kIndexedDBKeyNumberTypeByte: {
double d;
if (!DecodeDouble(slice, &d))
return false;
- *value = base::WrapUnique(new IndexedDBKey(d, WebIDBKeyTypeNumber));
+ *value = base::MakeUnique<IndexedDBKey>(d, WebIDBKeyTypeNumber);
return true;
}
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_index_writer.cc ('k') | content/browser/indexed_db/indexed_db_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698