diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 05:41:06 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 05:41:06 +0000 |
commit | 2d24533e33dca38c64e2a4ec2480eb59b6ef34b6 (patch) | |
tree | 1f084ff16fafe4c71e13f218f1394f16a13ff7ab /chrome/browser | |
parent | e00d39192ccc3713059caef9bdb7cf74d902f7df (diff) | |
download | chromium_src-2d24533e33dca38c64e2a4ec2480eb59b6ef34b6.zip chromium_src-2d24533e33dca38c64e2a4ec2480eb59b6ef34b6.tar.gz chromium_src-2d24533e33dca38c64e2a4ec2480eb59b6ef34b6.tar.bz2 |
Remove useless BlockedRequest class.
R=wtc
BUG=8860
Review URL: http://codereview.chromium.org/42384
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.cc | 9 | ||||
-rw-r--r-- | chrome/browser/renderer_host/resource_dispatcher_host.h | 10 |
2 files changed, 6 insertions, 13 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index a57b9c2..36e01aa 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -1012,7 +1012,7 @@ void ResourceDispatcherHost::BeginRequestInternal(URLRequest* request) { BlockedRequestMap::const_iterator iter = blocked_requests_map_.find(pair_id); if (iter != blocked_requests_map_.end()) { // The request should be blocked. - iter->second->push_back(BlockedRequest(request)); + iter->second->push_back(request); return; } @@ -1503,13 +1503,14 @@ void ResourceDispatcherHost::ProcessBlockedRequestsForRoute( req_iter != requests->end(); ++req_iter) { // Remove the memory credit that we added when pushing the request onto // the blocked list. - ExtraRequestInfo* info = ExtraInfoForRequest(req_iter->url_request); + URLRequest* request = *req_iter; + ExtraRequestInfo* info = ExtraInfoForRequest(request); IncrementOutstandingRequestsMemoryCost(-1 * info->memory_cost, info->process_id); if (cancel_requests) - delete req_iter->url_request; + delete request; else - BeginRequestInternal(req_iter->url_request); + BeginRequestInternal(request); } delete requests; diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h index 4bc7837..2ec711b 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.h +++ b/chrome/browser/renderer_host/resource_dispatcher_host.h @@ -371,14 +371,6 @@ class ResourceDispatcherHost : public URLRequest::Delegate { friend class ShutdownTask; - // TODO(abarth): We don't need this struct any more. Let's get rid of it. - struct BlockedRequest { - explicit BlockedRequest(URLRequest* url_request) - : url_request(url_request) { - } - URLRequest* url_request; - }; - // A shutdown helper that runs on the IO thread. void OnShutdown(); @@ -527,7 +519,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate { // True if the resource dispatcher host has been shut down. bool is_shutdown_; - typedef std::vector<BlockedRequest> BlockedRequestsList; + typedef std::vector<URLRequest*> BlockedRequestsList; typedef std::pair<int, int> ProcessRouteIDs; typedef std::map<ProcessRouteIDs, BlockedRequestsList*> BlockedRequestMap; BlockedRequestMap blocked_requests_map_; |