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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 1603503002: Use scoped_ptr for loaders map in ResourceDispatcherHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove linked_ptr.h Created 4 years, 11 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
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.h
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index 74922647f29781d54a54a05d462560956ebf029f..a64f34a377eefdd63a8b6bc74e32350945c27d70 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -21,7 +21,6 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/time/time.h"
@@ -342,7 +341,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
scoped_ptr<ResourceHandler> handler);
void StartLoading(ResourceRequestInfoImpl* info,
- const linked_ptr<ResourceLoader>& loader);
+ scoped_ptr<ResourceLoader> loader);
// We keep track of how much memory each request needs and how many requests
// are issued by each renderer. These are known as OustandingRequestStats.
@@ -389,7 +388,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// It may be enhanced in the future to provide some kind of prioritization
// mechanism. We should also consider a hashtable or binary tree if it turns
// out we have a lot of things here.
- typedef std::map<GlobalRequestID, linked_ptr<ResourceLoader> > LoaderMap;
+ using LoaderMap = std::map<GlobalRequestID, scoped_ptr<ResourceLoader>>;
// Deletes the pending request identified by the iterator passed in.
// This function will invalidate the iterator passed in. Callers should
@@ -442,7 +441,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
int route_id,
int request_id,
const ResourceHostMsg_Request& request_data,
- const linked_ptr<ResourceLoader>& loader);
+ LoaderMap::iterator iter);
void BeginRequest(int request_id,
const ResourceHostMsg_Request& request_data,
@@ -551,8 +550,9 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// True if the resource dispatcher host has been shut down.
bool is_shutdown_;
- typedef std::vector<linked_ptr<ResourceLoader> > BlockedLoadersList;
- typedef std::map<GlobalRoutingID, BlockedLoadersList*> BlockedLoadersMap;
+ using BlockedLoadersList = std::vector<scoped_ptr<ResourceLoader>>;
+ using BlockedLoadersMap =
+ std::map<GlobalRoutingID, scoped_ptr<BlockedLoadersList>>;
BlockedLoadersMap blocked_loaders_map_;
// Maps the child_ids to the approximate number of bytes
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698