diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 01:55:13 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 01:55:13 +0000 |
commit | 4566f13fe843c0821dbce19d7ea5e8aece8afe4a (patch) | |
tree | 586c6006431604f6b159daca30fcdfe4913ad996 /chrome/browser/renderer_host/async_resource_handler.cc | |
parent | 3f366001f70b1ef4b8884796970cefb0769c469f (diff) | |
download | chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.zip chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.tar.gz chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.tar.bz2 |
Stop having renderers use both pids and a monotonically increasing "host_id". This allows ResourceDispatcher to be used by child processes other than renderers. I've done minor related cleanup on the way to make the code simpler.
Review URL: http://codereview.chromium.org/42054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/async_resource_handler.cc')
-rw-r--r-- | chrome/browser/renderer_host/async_resource_handler.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/renderer_host/async_resource_handler.cc b/chrome/browser/renderer_host/async_resource_handler.cc index 650c7c3..73aa227 100644 --- a/chrome/browser/renderer_host/async_resource_handler.cc +++ b/chrome/browser/renderer_host/async_resource_handler.cc @@ -35,15 +35,15 @@ class SharedIOBuffer : public net::IOBuffer { AsyncResourceHandler::AsyncResourceHandler( ResourceDispatcherHost::Receiver* receiver, - int render_process_host_id, + int process_id, int routing_id, - base::ProcessHandle render_process, + base::ProcessHandle process_handle, const GURL& url, ResourceDispatcherHost* resource_dispatcher_host) : receiver_(receiver), - render_process_host_id_(render_process_host_id), + process_id_(process_id), routing_id_(routing_id), - render_process_(render_process), + process_handle_(process_handle), rdh_(resource_dispatcher_host) { } @@ -91,18 +91,18 @@ bool AsyncResourceHandler::OnReadCompleted(int request_id, int* bytes_read) { return true; DCHECK(read_buffer_.get()); - if (!rdh_->WillSendData(render_process_host_id_, request_id)) { + if (!rdh_->WillSendData(process_id_, request_id)) { // We should not send this data now, we have too many pending requests. return true; } base::SharedMemoryHandle handle; - if (!read_buffer_->shared_memory()->GiveToProcess(render_process_, &handle)) { + if (!read_buffer_->shared_memory()->GiveToProcess(process_handle_, &handle)) { // We wrongfully incremented the pending data count. Fake an ACK message // to fix this. We can't move this call above the WillSendData because // it's killing our read_buffer_, and we don't want that when we pause // the request. - rdh_->OnDataReceivedACK(render_process_host_id_, request_id); + rdh_->OnDataReceivedACK(process_id_, request_id); // We just unmapped the memory. read_buffer_ = NULL; return false; |