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

Unified Diff: content/browser/cache_storage/cache_storage_cache.cc

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (Closed)
Patch Set: Fix typo breaking a bunch of trybot builds, oops Created 4 years, 1 month 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/cache_storage/cache_storage_cache.cc
diff --git a/content/browser/cache_storage/cache_storage_cache.cc b/content/browser/cache_storage/cache_storage_cache.cc
index 6ca5786b882581b11095984e4565ee02f7e691fc..b3eb99ea85ed067f09af90e661ad20208d52caea 100644
--- a/content/browser/cache_storage/cache_storage_cache.cc
+++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -1130,10 +1130,11 @@ void CacheStorageCache::PutDidWriteHeaders(
disk_cache::ScopedEntryPtr entry(std::move(put_context->cache_entry));
put_context->cache_entry = NULL;
- CacheStorageBlobToDiskCache* blob_to_cache =
- new CacheStorageBlobToDiskCache();
BlobToDiskCacheIDMap::KeyType blob_to_cache_key =
- active_blob_to_disk_cache_writers_.Add(blob_to_cache);
+ active_blob_to_disk_cache_writers_.Add(
+ base::MakeUnique<CacheStorageBlobToDiskCache>());
+ CacheStorageBlobToDiskCache* blob_to_cache =
+ active_blob_to_disk_cache_writers_.Lookup(blob_to_cache_key);
danakj 2016/11/18 00:15:33 same
std::unique_ptr<storage::BlobDataHandle> blob_data_handle =
std::move(put_context->blob_data_handle);

Powered by Google App Engine
This is Rietveld 408576698