Index: content/browser/appcache/appcache_storage.h |
diff --git a/content/browser/appcache/appcache_storage.h b/content/browser/appcache/appcache_storage.h |
index d4e5dfe37d9ae747c7d84b5c003475cecbe6e21b..3b3f182e6ba774e859a62eb478f53b8660e8ac34 100644 |
--- a/content/browser/appcache/appcache_storage.h |
+++ b/content/browser/appcache/appcache_storage.h |
@@ -275,7 +275,8 @@ class CONTENT_EXPORT AppCacheStorage { |
scoped_refptr<HttpResponseInfoIOBuffer> info_buffer_; |
}; |
- typedef std::map<int64_t, ResponseInfoLoadTask*> PendingResponseInfoLoads; |
+ typedef std::map<int64_t, std::unique_ptr<ResponseInfoLoadTask>> |
+ PendingResponseInfoLoads; |
DelegateReference* GetDelegateReference(Delegate* delegate) { |
DelegateReferenceMap::iterator iter = |
@@ -295,10 +296,9 @@ class CONTENT_EXPORT AppCacheStorage { |
ResponseInfoLoadTask* GetOrCreateResponseInfoLoadTask( |
const GURL& manifest_url, |
int64_t response_id) { |
- PendingResponseInfoLoads::iterator iter = |
- pending_info_loads_.find(response_id); |
+ auto iter = pending_info_loads_.find(response_id); |
if (iter != pending_info_loads_.end()) |
- return iter->second; |
+ return iter->second.get(); |
return new ResponseInfoLoadTask(manifest_url, response_id, this); |
} |
@@ -319,6 +319,8 @@ class CONTENT_EXPORT AppCacheStorage { |
AppCacheWorkingSet working_set_; |
AppCacheServiceImpl* service_; |
DelegateReferenceMap delegate_references_; |
+ |
+ // Note that the ResponseInfoLoadTask items add themselves to this map. |
PendingResponseInfoLoads pending_info_loads_; |
// The set of last ids must be retrieved from storage prior to being used. |