Index: content/browser/renderer_host/resource_dispatcher_host.h |
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h |
index 56bd015bd2b24f67f40ed4fee27f4476df7e9b7f..e83efc77563c5a8b8a668922b99c3d2ebe8ab15b 100644 |
--- a/content/browser/renderer_host/resource_dispatcher_host.h |
+++ b/content/browser/renderer_host/resource_dispatcher_host.h |
@@ -85,7 +85,7 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
// is shutting down, then |started_cb| will be called immediately. There is no |
// situation in which |started_cb| will never be called. |
void BeginDownload( |
- net::URLRequest* request, // ownership is taken |
+ scoped_ptr<net::URLRequest> request, |
const DownloadSaveInfo& save_info, |
bool prompt_for_save_location, |
const DownloadResourceHandler::OnStartedCallback& started_cb, |
@@ -97,13 +97,13 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
// request from the renderer or another child process). |
void BeginSaveFile(const GURL& url, |
const GURL& referrer, |
- int process_unique_id, |
+ int child_id, |
int route_id, |
const content::ResourceContext& context); |
// Cancels the given request if it still exists. We ignore cancels from the |
// renderer in the event of a download. |
- void CancelRequest(int process_unique_id, |
+ void CancelRequest(int child_id, |
int request_id, |
bool from_renderer); |
@@ -114,21 +114,21 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
// new_first_party_for_cookies. Otherwise, pass false as |
// has_new_first_party_for_cookies, and new_first_party_for_cookies will not |
// be used. |
- void FollowDeferredRedirect(int process_unique_id, |
+ void FollowDeferredRedirect(int child_id, |
int request_id, |
bool has_new_first_party_for_cookies, |
const GURL& new_first_party_for_cookies); |
// Starts a request that was deferred during ResourceHandler::OnWillStart(). |
- void StartDeferredRequest(int process_unique_id, int request_id); |
+ void StartDeferredRequest(int child_id, int request_id); |
// Returns true if it's ok to send the data. If there are already too many |
// data messages pending, it pauses the request and returns false. In this |
// case the caller should not send the data. |
- bool WillSendData(int process_unique_id, int request_id); |
+ bool WillSendData(int child_id, int request_id); |
// Pauses or resumes network activity for a particular request. |
- void PauseRequest(int process_unique_id, int request_id, bool pause); |
+ void PauseRequest(int child_id, int request_id, bool pause); |
// Returns the number of pending requests. This is designed for the unittests |
int pending_requests() const { |
@@ -136,8 +136,8 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
} |
// Intended for unit-tests only. Returns the memory cost of all the |
- // outstanding requests (pending and blocked) for |process_unique_id|. |
- int GetOutstandingRequestsMemoryCost(int process_unique_id) const; |
+ // outstanding requests (pending and blocked) for |child_id|. |
+ int GetOutstandingRequestsMemoryCost(int child_id) const; |
// Intended for unit-tests only. Overrides the outstanding requests bound. |
void set_max_outstanding_requests_cost_per_process(int limit) { |
@@ -166,11 +166,11 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
ResourceType::Type resource_type); |
// Force cancels any pending requests for the given process. |
- void CancelRequestsForProcess(int process_unique_id); |
+ void CancelRequestsForProcess(int child_id); |
// Force cancels any pending requests for the given route id. This method |
// acts like CancelRequestsForProcess when route_id is -1. |
- void CancelRequestsForRoute(int process_unique_id, int route_id); |
+ void CancelRequestsForRoute(int child_id, int route_id); |
// Force cancels any pending requests for the given |context|. This is |
// necessary to ensure that before |context| goes away, all requests |
@@ -221,24 +221,24 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
net::URLRequest* GetURLRequest( |
const content::GlobalRequestID& request_id) const; |
- void RemovePendingRequest(int process_unique_id, int request_id); |
+ void RemovePendingRequest(int child_id, int request_id); |
// Causes all new requests for the route identified by |
- // |process_unique_id| and |route_id| to be blocked (not being |
+ // |child_id| and |route_id| to be blocked (not being |
// started) until ResumeBlockedRequestsForRoute or |
// CancelBlockedRequestsForRoute is called. |
- void BlockRequestsForRoute(int process_unique_id, int route_id); |
+ void BlockRequestsForRoute(int child_id, int route_id); |
// Resumes any blocked request for the specified route id. |
- void ResumeBlockedRequestsForRoute(int process_unique_id, int route_id); |
+ void ResumeBlockedRequestsForRoute(int child_id, int route_id); |
// Cancels any blocked request for the specified route id. |
- void CancelBlockedRequestsForRoute(int process_unique_id, int route_id); |
+ void CancelBlockedRequestsForRoute(int child_id, int route_id); |
// Decrements the pending_data_count for the request and resumes |
// the request if it was paused due to too many pending data |
// messages sent. |
- void DataReceivedACK(int process_unique_id, int request_id); |
+ void DataReceivedACK(int child_id, int request_id); |
// Maintains a collection of temp files created in support of |
// the download_to_file capability. Used to grant access to the |
@@ -333,14 +333,14 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
net::URLRequest* request, |
const ResourceDispatcherHostRequestInfo& request_info); |
- // Updates the "cost" of outstanding requests for |process_unique_id|. |
+ // Updates the "cost" of outstanding requests for |child_id|. |
// The "cost" approximates how many bytes are consumed by all the in-memory |
// data structures supporting this request (net::URLRequest object, |
// HttpNetworkTransaction, etc...). |
// The value of |cost| is added to the running total, and the resulting |
// sum is returned. |
int IncrementOutstandingRequestsMemoryCost(int cost, |
- int process_unique_id); |
+ int child_id); |
// Estimate how much heap space |request| will consume to run. |
static int CalculateApproximateMemoryCost(net::URLRequest* request); |
@@ -361,17 +361,17 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
void RemovePendingRequest(const PendingRequestList::iterator& iter); |
// Notify our observers that we started receiving a response for a request. |
- void NotifyResponseStarted(net::URLRequest* request, int process_unique_id); |
+ void NotifyResponseStarted(net::URLRequest* request, int child_id); |
// Notify our observers that a request has been redirected. |
void NotifyReceivedRedirect(net::URLRequest* request, |
- int process_unique_id, |
+ int child_id, |
const GURL& new_url); |
// Tries to handle the url with an external protocol. If the request is |
// handled, the function returns true. False otherwise. |
bool HandleExternalProtocol(int request_id, |
- int process_unique_id, |
+ int child_id, |
int route_id, |
const GURL& url, |
ResourceType::Type resource_type, |
@@ -387,7 +387,7 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
net::URLRequest *request); |
// Resumes or cancels (if |cancel_requests| is true) any blocked requests. |
- void ProcessBlockedRequestsForRoute(int process_unique_id, |
+ void ProcessBlockedRequestsForRoute(int child_id, |
int route_id, |
bool cancel_requests); |
@@ -496,7 +496,7 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
typedef std::map<ProcessRouteIDs, BlockedRequestsList*> BlockedRequestMap; |
BlockedRequestMap blocked_requests_map_; |
- // Maps the process_unique_ids to the approximate number of bytes |
+ // Maps the child_ids to the approximate number of bytes |
// being used to service its resource requests. No entry implies 0 cost. |
typedef std::map<int, int> OutstandingRequestsMemoryCostMap; |
OutstandingRequestsMemoryCostMap outstanding_requests_memory_cost_map_; |