summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resource_dispatcher_host.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 03:25:15 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 03:25:15 +0000
commit176aa48371da91eb98d675d87b4e70c7b26d696f (patch)
tree4c972de6ecd5a54650ab1dc7d421187f5d25834f /chrome/browser/resource_dispatcher_host.cc
parent9a3f0ac2899139ace97e399015259d028b4d5704 (diff)
downloadchromium_src-176aa48371da91eb98d675d87b4e70c7b26d696f.zip
chromium_src-176aa48371da91eb98d675d87b4e70c7b26d696f.tar.gz
chromium_src-176aa48371da91eb98d675d87b4e70c7b26d696f.tar.bz2
Add Terminate() to the Process object, have RenderProcessHost use this to avoid some more Windows specific code.
Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resource_dispatcher_host.cc')
-rw-r--r--chrome/browser/resource_dispatcher_host.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc
index f990a26..fdaadc3 100644
--- a/chrome/browser/resource_dispatcher_host.cc
+++ b/chrome/browser/resource_dispatcher_host.cc
@@ -121,7 +121,7 @@ class ResourceDispatcherHost::AsyncEventHandler
read_buffer_.reset(spare_read_buffer_);
spare_read_buffer_ = NULL;
} else {
- read_buffer_.reset(new SharedMemory);
+ read_buffer_.reset(new base::SharedMemory);
if (!read_buffer_->Create(std::wstring(), false, false, kReadBufSize))
return false;
if (!read_buffer_->Map(kReadBufSize))
@@ -142,7 +142,7 @@ class ResourceDispatcherHost::AsyncEventHandler
return true;
}
- SharedMemoryHandle handle;
+ base::SharedMemoryHandle handle;
if (!read_buffer_->GiveToProcess(render_process_, &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
@@ -175,16 +175,18 @@ class ResourceDispatcherHost::AsyncEventHandler
// When reading, we don't know if we are going to get EOF (0 bytes read), so
// we typically have a buffer that we allocated but did not use. We keep
// this buffer around for the next read as a small optimization.
- static SharedMemory* spare_read_buffer_;
+ static base::SharedMemory* spare_read_buffer_;
- scoped_ptr<SharedMemory> read_buffer_;
+ scoped_ptr<base::SharedMemory> read_buffer_;
ResourceDispatcherHost::Receiver* receiver_;
int render_process_host_id_;
int routing_id_;
HANDLE render_process_;
ResourceDispatcherHost* rdh_;
};
-SharedMemory* ResourceDispatcherHost::AsyncEventHandler::spare_read_buffer_;
+
+base::SharedMemory*
+ ResourceDispatcherHost::AsyncEventHandler::spare_read_buffer_;
// ----------------------------------------------------------------------------
// ResourceDispatcherHost::SyncEventHandler