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

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

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (Closed)
Patch Set: Make changes requested by danakj, fix a few more headers 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 77286600d22f3f6f75286086d32f83a921e81353..b805cf81ecf48d76b94cd73d0dcfedd3acfacc51 100644
--- a/content/browser/cache_storage/cache_storage_cache.cc
+++ b/content/browser/cache_storage/cache_storage_cache.cc
@@ -1131,15 +1131,15 @@ void CacheStorageCache::PutDidWriteHeaders(
disk_cache::ScopedEntryPtr entry(std::move(put_context->cache_entry));
put_context->cache_entry = NULL;
- CacheStorageBlobToDiskCache* blob_to_cache =
- new CacheStorageBlobToDiskCache();
+ auto blob_to_cache = base::MakeUnique<CacheStorageBlobToDiskCache>();
+ CacheStorageBlobToDiskCache* blob_to_cache_raw = blob_to_cache.get();
BlobToDiskCacheIDMap::KeyType blob_to_cache_key =
- active_blob_to_disk_cache_writers_.Add(blob_to_cache);
+ active_blob_to_disk_cache_writers_.Add(std::move(blob_to_cache));
std::unique_ptr<storage::BlobDataHandle> blob_data_handle =
std::move(put_context->blob_data_handle);
- blob_to_cache->StreamBlobToCache(
+ blob_to_cache_raw->StreamBlobToCache(
std::move(entry), INDEX_RESPONSE_BODY, request_context_getter_.get(),
std::move(blob_data_handle),
base::Bind(&CacheStorageCache::PutDidWriteBlobToCache,
« no previous file with comments | « components/test_runner/mock_screen_orientation_client.cc ('k') | content/browser/manifest/manifest_manager_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698