summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/fileapi/fileapi_message_filter.cc4
-rw-r--r--content/browser/indexed_db/indexed_db_dispatcher_host.cc4
-rw-r--r--content/browser/loader/async_resource_handler.cc4
-rw-r--r--content/browser/profiler_message_filter.cc2
-rw-r--r--content/browser/renderer_host/clipboard_message_filter.cc4
-rw-r--r--content/browser/renderer_host/database_message_filter.cc2
-rw-r--r--content/browser/renderer_host/file_utilities_message_filter.cc2
-rw-r--r--content/browser/renderer_host/gamepad_browser_message_filter.cc2
-rw-r--r--content/browser/renderer_host/media/audio_input_renderer_host.cc6
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host.cc6
-rw-r--r--content/browser/renderer_host/media/peer_connection_tracker_host.cc10
-rw-r--r--content/browser/renderer_host/media/video_capture_host.cc2
-rw-r--r--content/browser/renderer_host/render_message_filter.cc16
13 files changed, 31 insertions, 33 deletions
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc
index 63a50a1..312e04d 100644
--- a/content/browser/fileapi/fileapi_message_filter.cc
+++ b/content/browser/fileapi/fileapi_message_filter.cc
@@ -440,7 +440,7 @@ void FileAPIMessageFilter::OnOpenFile(
}
operations_[request_id] = operation_runner()->OpenFile(
- url, file_flags, peer_handle(),
+ url, file_flags, PeerHandle(),
base::Bind(&FileAPIMessageFilter::DidOpenFile, this, request_id,
quota_policy));
}
@@ -552,7 +552,7 @@ void FileAPIMessageFilter::OnAppendSharedMemory(
return;
}
#if defined(OS_WIN)
- base::SharedMemory shared_memory(handle, true, peer_handle());
+ base::SharedMemory shared_memory(handle, true, PeerHandle());
#else
base::SharedMemory shared_memory(handle, true);
#endif
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index ee9882f..87f430e 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -143,7 +143,7 @@ int64 IndexedDBDispatcherHost::HostTransactionId(int64 transaction_id) {
// uniquely identify this transaction, and effectively bind it to
// the renderer that initiated it. The lower 32 bits of
// transaction_id are guaranteed to be unique within that renderer.
- base::ProcessId pid = base::GetProcId(peer_handle());
+ base::ProcessId pid = peer_pid();
DCHECK(!(transaction_id >> 32)) << "Transaction ids can only be 32 bits";
COMPILE_ASSERT(sizeof(base::ProcessId) <= sizeof(int32),
Process_ID_must_fit_in_32_bits);
@@ -153,7 +153,7 @@ int64 IndexedDBDispatcherHost::HostTransactionId(int64 transaction_id) {
int64 IndexedDBDispatcherHost::RendererTransactionId(
int64 host_transaction_id) {
- DCHECK(host_transaction_id >> 32 == base::GetProcId(peer_handle()))
+ DCHECK(host_transaction_id >> 32 == peer_pid())
<< "Invalid renderer target for transaction id";
return host_transaction_id & 0xffffffff;
}
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index 574b137..d0bade5 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -253,11 +253,11 @@ bool AsyncResourceHandler::OnReadCompleted(int request_id, int bytes_read,
if (!sent_first_data_msg_) {
base::SharedMemoryHandle handle;
int size;
- if (!buffer_->ShareToProcess(filter_->peer_handle(), &handle, &size))
+ if (!buffer_->ShareToProcess(filter_->PeerHandle(), &handle, &size))
return false;
filter_->Send(
new ResourceMsg_SetDataBuffer(routing_id_, request_id, handle, size,
- base::GetProcId(filter_->peer_handle())));
+ filter_->peer_pid()));
sent_first_data_msg_ = true;
}
diff --git a/content/browser/profiler_message_filter.cc b/content/browser/profiler_message_filter.cc
index 217a2f4..9eeaa03 100644
--- a/content/browser/profiler_message_filter.cc
+++ b/content/browser/profiler_message_filter.cc
@@ -50,7 +50,7 @@ void ProfilerMessageFilter::OnChildProfilerData(
#if defined(USE_TCMALLOC)
void ProfilerMessageFilter::OnTcmallocStats(const std::string& output) {
AboutTcmallocOutputs::GetInstance()->OnStatsForChildProcess(
- base::GetProcId(peer_handle()), process_type_, output);
+ peer_pid(), process_type_, output);
}
#endif
diff --git a/content/browser/renderer_host/clipboard_message_filter.cc b/content/browser/renderer_host/clipboard_message_filter.cc
index 1d4a851..46475df 100644
--- a/content/browser/renderer_host/clipboard_message_filter.cc
+++ b/content/browser/renderer_host/clipboard_message_filter.cc
@@ -95,7 +95,7 @@ void ClipboardMessageFilter::OnWriteObjectsSync(
DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle))
<< "Bad bitmap handle";
// Splice the shared memory handle into the clipboard data.
- ui::Clipboard::ReplaceSharedMemHandle(&objects, bitmap_handle, peer_handle());
+ ui::Clipboard::ReplaceSharedMemHandle(&objects, bitmap_handle, PeerHandle());
#if defined(OS_WIN)
// We cannot write directly from the IO thread, and cannot service the IPC
// on the UI thread. We'll copy the relevant data and get a handle to any
@@ -214,7 +214,7 @@ void ClipboardMessageFilter::OnReadImageReply(
base::SharedMemory buffer;
if (buffer.CreateAndMapAnonymous(png_data.size())) {
memcpy(buffer.memory(), vector_as_array(&png_data), png_data.size());
- if (buffer.GiveToProcess(peer_handle(), &image_handle)) {
+ if (buffer.GiveToProcess(PeerHandle(), &image_handle)) {
image_size = png_data.size();
}
}
diff --git a/content/browser/renderer_host/database_message_filter.cc b/content/browser/renderer_host/database_message_filter.cc
index 470da3b..38cc49a 100644
--- a/content/browser/renderer_host/database_message_filter.cc
+++ b/content/browser/renderer_host/database_message_filter.cc
@@ -157,7 +157,7 @@ void DatabaseMessageFilter::OnDatabaseOpenFile(const string16& vfs_file_name,
// database tracker.
bool auto_close = !db_tracker_->HasSavedIncognitoFileHandle(vfs_file_name);
IPC::PlatformFileForTransit target_handle =
- IPC::GetFileHandleForProcess(file_handle, peer_handle(), auto_close);
+ IPC::GetFileHandleForProcess(file_handle, PeerHandle(), auto_close);
DatabaseHostMsg_OpenFile::WriteReplyParams(reply_msg, target_handle);
Send(reply_msg);
diff --git a/content/browser/renderer_host/file_utilities_message_filter.cc b/content/browser/renderer_host/file_utilities_message_filter.cc
index a2fcd80..bae1079 100644
--- a/content/browser/renderer_host/file_utilities_message_filter.cc
+++ b/content/browser/renderer_host/file_utilities_message_filter.cc
@@ -80,7 +80,7 @@ void FileUtilitiesMessageFilter::OnOpenFile(
#if defined(OS_WIN)
// Duplicate the file handle so that the renderer process can access the file.
if (!DuplicateHandle(GetCurrentProcess(), file_handle,
- peer_handle(), result, 0, false,
+ PeerHandle(), result, 0, false,
DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
// file_handle is closed whether or not DuplicateHandle succeeds.
*result = INVALID_HANDLE_VALUE;
diff --git a/content/browser/renderer_host/gamepad_browser_message_filter.cc b/content/browser/renderer_host/gamepad_browser_message_filter.cc
index 71c2aab..6b5972e 100644
--- a/content/browser/renderer_host/gamepad_browser_message_filter.cc
+++ b/content/browser/renderer_host/gamepad_browser_message_filter.cc
@@ -39,7 +39,7 @@ void GamepadBrowserMessageFilter::OnGamepadStartPolling(
if (!is_started_) {
is_started_ = true;
service->AddConsumer();
- *renderer_handle = service->GetSharedMemoryHandleForProcess(peer_handle());
+ *renderer_handle = service->GetSharedMemoryHandleForProcess(PeerHandle());
} else {
// Currently we only expect the renderer to tell us once to start.
NOTREACHED();
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 7b0416e..27c300d 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -118,7 +118,7 @@ void AudioInputRendererHost::DoCompleteCreation(
if (!entry)
return;
- if (!peer_handle()) {
+ if (!PeerHandle()) {
NOTREACHED() << "Renderer process handle is invalid.";
DeleteEntryOnError(entry);
return;
@@ -133,7 +133,7 @@ void AudioInputRendererHost::DoCompleteCreation(
// Once the audio stream is created then complete the creation process by
// mapping shared memory and sharing with the renderer process.
base::SharedMemoryHandle foreign_memory_handle;
- if (!entry->shared_memory.ShareToProcess(peer_handle(),
+ if (!entry->shared_memory.ShareToProcess(PeerHandle(),
&foreign_memory_handle)) {
// If we failed to map and share the shared memory then close the audio
// stream and send an error message.
@@ -152,7 +152,7 @@ void AudioInputRendererHost::DoCompleteCreation(
// If we failed to prepare the sync socket for the renderer then we fail
// the construction of audio input stream.
- if (!writer->PrepareForeignSocketHandle(peer_handle(),
+ if (!writer->PrepareForeignSocketHandle(PeerHandle(),
&foreign_socket_handle)) {
DeleteEntryOnError(entry);
return;
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index 0c8c310..d53fd1c 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -195,7 +195,7 @@ void AudioRendererHost::AudioEntry::OnDeviceChange(int new_buffer_size,
void AudioRendererHost::DoCompleteCreation(AudioEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- if (!peer_handle()) {
+ if (!PeerHandle()) {
NOTREACHED() << "Renderer process handle is invalid.";
ReportErrorAndClose(entry->stream_id());
return;
@@ -204,7 +204,7 @@ void AudioRendererHost::DoCompleteCreation(AudioEntry* entry) {
// Once the audio stream is created then complete the creation process by
// mapping shared memory and sharing with the renderer process.
base::SharedMemoryHandle foreign_memory_handle;
- if (!entry->shared_memory()->ShareToProcess(peer_handle(),
+ if (!entry->shared_memory()->ShareToProcess(PeerHandle(),
&foreign_memory_handle)) {
// If we failed to map and share the shared memory then close the audio
// stream and send an error message.
@@ -222,7 +222,7 @@ void AudioRendererHost::DoCompleteCreation(AudioEntry* entry) {
// If we failed to prepare the sync socket for the renderer then we fail
// the construction of audio stream.
- if (!reader->PrepareForeignSocketHandle(peer_handle(),
+ if (!reader->PrepareForeignSocketHandle(PeerHandle(),
&foreign_socket_handle)) {
ReportErrorAndClose(entry->stream_id());
return;
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.cc b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
index 4ba1a0a..3919be7 100644
--- a/content/browser/renderer_host/media/peer_connection_tracker_host.cc
+++ b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
@@ -42,7 +42,7 @@ void PeerConnectionTrackerHost::OnAddPeerConnection(
const PeerConnectionInfo& info) {
WebRTCInternals::GetInstance()->OnAddPeerConnection(
render_process_id_,
- base::GetProcId(peer_handle()),
+ peer_pid(),
info.lid,
info.url,
info.servers,
@@ -50,14 +50,13 @@ void PeerConnectionTrackerHost::OnAddPeerConnection(
}
void PeerConnectionTrackerHost::OnRemovePeerConnection(int lid) {
- WebRTCInternals::GetInstance()->OnRemovePeerConnection(
- base::GetProcId(peer_handle()), lid);
+ WebRTCInternals::GetInstance()->OnRemovePeerConnection(peer_pid(), lid);
}
void PeerConnectionTrackerHost::OnUpdatePeerConnection(
int lid, const std::string& type, const std::string& value) {
WebRTCInternals::GetInstance()->OnUpdatePeerConnection(
- base::GetProcId(peer_handle()),
+ peer_pid(),
lid,
type,
value);
@@ -65,8 +64,7 @@ void PeerConnectionTrackerHost::OnUpdatePeerConnection(
void PeerConnectionTrackerHost::OnAddStats(int lid,
const base::ListValue& value) {
- WebRTCInternals::GetInstance()->OnAddStats(
- base::GetProcId(peer_handle()), lid, value);
+ WebRTCInternals::GetInstance()->OnAddStats(peer_pid(), lid, value);
}
} // namespace content
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 17f56b5..91ecca0 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -232,7 +232,7 @@ void VideoCaptureHost::DoControllerAddedOnIOThread(
}
it->second->controller = controller;
- controller->StartCapture(controller_id, this, peer_handle(), params);
+ controller->StartCapture(controller_id, this, PeerHandle(), params);
}
void VideoCaptureHost::OnStopCapture(int device_id) {
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index fcb719c..f313079 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -143,7 +143,7 @@ class OpenChannelToPpapiPluginCallback
virtual void GetPpapiChannelInfo(base::ProcessHandle* renderer_handle,
int* renderer_id) OVERRIDE {
- *renderer_handle = filter()->peer_handle();
+ *renderer_handle = filter()->PeerHandle();
*renderer_id = filter()->render_process_id();
}
@@ -182,7 +182,7 @@ class OpenChannelToPpapiBrokerCallback
virtual void GetPpapiChannelInfo(base::ProcessHandle* renderer_handle,
int* renderer_id) OVERRIDE {
- *renderer_handle = filter_->peer_handle();
+ *renderer_handle = filter_->PeerHandle();
*renderer_id = filter_->render_process_id();
}
@@ -345,7 +345,7 @@ void RenderMessageFilter::OnChannelClosing() {
void RenderMessageFilter::OnChannelConnected(int32 peer_id) {
BrowserMessageFilter::OnChannelConnected(peer_id);
- base::ProcessHandle handle = peer_handle();
+ base::ProcessHandle handle = PeerHandle();
#if defined(OS_MACOSX)
process_metrics_.reset(base::ProcessMetrics::CreateProcessMetrics(handle,
NULL));
@@ -480,7 +480,7 @@ void RenderMessageFilter::OnCreateWindow(
render_widget_helper_->CreateNewWindow(params,
no_javascript_access,
- peer_handle(),
+ PeerHandle(),
route_id,
main_frame_route_id,
surface_id,
@@ -508,10 +508,10 @@ void RenderMessageFilter::OnGetProcessMemorySizes(size_t* private_bytes,
using base::ProcessMetrics;
#if !defined(OS_MACOSX) || defined(OS_IOS)
scoped_ptr<ProcessMetrics> metrics(ProcessMetrics::CreateProcessMetrics(
- peer_handle()));
+ PeerHandle()));
#else
scoped_ptr<ProcessMetrics> metrics(ProcessMetrics::CreateProcessMetrics(
- peer_handle(), content::BrowserChildProcessHost::GetPortProvider()));
+ PeerHandle(), content::BrowserChildProcessHost::GetPortProvider()));
#endif
if (!metrics->GetMemoryBytes(private_bytes, shared_bytes)) {
*private_bytes = 0;
@@ -856,7 +856,7 @@ void RenderMessageFilter::OnAllocateSharedMemory(
uint32 buffer_size,
base::SharedMemoryHandle* handle) {
ChildProcessHostImpl::AllocateSharedMemory(
- buffer_size, peer_handle(), handle);
+ buffer_size, PeerHandle(), handle);
}
net::URLRequestContext* RenderMessageFilter::GetRequestContextForURL(
@@ -1009,7 +1009,7 @@ void RenderMessageFilter::AsyncOpenFileOnFileThread(const base::FilePath& path,
path, flags, NULL, &error_code);
IPC::PlatformFileForTransit file_for_transit =
file != base::kInvalidPlatformFileValue ?
- IPC::GetFileHandleForProcess(file, peer_handle(), true) :
+ IPC::GetFileHandleForProcess(file, PeerHandle(), true) :
IPC::InvalidPlatformFileForTransit();
IPC::Message* reply = new ViewMsg_AsyncOpenFile_ACK(