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

Unified Diff: content/browser/appcache/appcache_storage.h

Issue 2249473002: Remove use of stl_util's STLDeleteContainerPairSecondPointers from content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: p2p 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/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.

Powered by Google App Engine
This is Rietveld 408576698