Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 7712022: This patch caused Chrome to be unable to load any web pages on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index db801fd8563298c52ee180af028ac8c2fa508e1b..dc990c26184ab3c6d8d9aaaee9a6c9ef0acffeba 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -71,15 +71,10 @@ ChannelProxy::Context::~Context() {
}
void ChannelProxy::Context::CreateChannel(const IPC::ChannelHandle& handle,
- const Channel::Mode& mode,
- bool needs_override_peer_pid) {
+ const Channel::Mode& mode) {
DCHECK(channel_.get() == NULL);
channel_id_ = handle.name;
channel_.reset(new Channel(handle, mode, this));
-#if defined(OS_LINUX)
- if (needs_override_peer_pid)
- channel_->SetNeedsOverridePeerPid();
-#endif
}
bool ChannelProxy::Context::TryFilters(const Message& message) {
@@ -231,14 +226,6 @@ void ChannelProxy::Context::OnRemoveFilter(MessageFilter* filter) {
NOTREACHED() << "filter to be removed not found";
}
-#if defined(OS_LINUX)
-// Called on the IPC::Channel thread
-void ChannelProxy::Context::OnOverridePeerPid(int32 peer_pid) {
- if (channel_.get())
- channel_->OverridePeerPid(peer_pid);
-}
-#endif // defined(OS_LINUX)
-
// Called on the listener's thread
void ChannelProxy::Context::AddFilter(MessageFilter* filter) {
base::AutoLock auto_lock(pending_filters_lock_);
@@ -295,23 +282,20 @@ void ChannelProxy::Context::OnDispatchError() {
ChannelProxy::ChannelProxy(const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
Channel::Listener* listener,
- base::MessageLoopProxy* ipc_thread,
- bool needs_override_peer_pid)
+ base::MessageLoopProxy* ipc_thread)
: context_(new Context(listener, ipc_thread)),
outgoing_message_filter_(NULL) {
- Init(channel_handle, mode, ipc_thread, true, needs_override_peer_pid);
+ Init(channel_handle, mode, ipc_thread, true);
}
ChannelProxy::ChannelProxy(const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
base::MessageLoopProxy* ipc_thread,
- bool needs_override_peer_pid,
Context* context,
bool create_pipe_now)
: context_(context),
outgoing_message_filter_(NULL) {
- Init(channel_handle, mode, ipc_thread, create_pipe_now,
- needs_override_peer_pid);
+ Init(channel_handle, mode, ipc_thread, create_pipe_now);
}
ChannelProxy::~ChannelProxy() {
@@ -321,8 +305,7 @@ ChannelProxy::~ChannelProxy() {
void ChannelProxy::Init(const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
base::MessageLoopProxy* ipc_thread_loop,
- bool create_pipe_now,
- bool needs_override_peer_pid) {
+ bool create_pipe_now) {
#if defined(OS_POSIX)
// When we are creating a server on POSIX, we need its file descriptor
// to be created immediately so that it can be accessed and passed
@@ -338,11 +321,10 @@ void ChannelProxy::Init(const IPC::ChannelHandle& channel_handle,
// low-level pipe so that the client can connect. Without creating
// the pipe immediately, it is possible for a listener to attempt
// to connect and get an error since the pipe doesn't exist yet.
- context_->CreateChannel(channel_handle, mode, needs_override_peer_pid);
+ context_->CreateChannel(channel_handle, mode);
} else {
context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- context_.get(), &Context::CreateChannel, channel_handle, mode,
- needs_override_peer_pid));
+ context_.get(), &Context::CreateChannel, channel_handle, mode));
}
// complete initialization on the background thread
@@ -410,13 +392,6 @@ bool ChannelProxy::GetClientEuid(uid_t* client_euid) const {
}
#endif
-#if defined(OS_LINUX)
-void ChannelProxy::OverridePeerPid(int32 peer_pid) {
- context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
- context_.get(), &Context::OnOverridePeerPid, peer_pid));
-}
-#endif // defined(OS_LINUX)
-
//-----------------------------------------------------------------------------
} // namespace IPC
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698