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

Unified Diff: ipc/ipc_channel_posix.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_posix.h ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 27231d1dcda467b4acd718c91483e4ae0925dbba..fe60691d3699533168c590161c0623484116c65c 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -309,9 +309,7 @@ Channel::ChannelImpl::ChannelImpl(const IPC::ChannelHandle& channel_handle,
#endif // IPC_USES_READWRITE
pipe_name_(channel_handle.name),
listener_(listener),
- must_unlink_(false),
- needs_override_peer_pid_(false),
- override_peer_pid_(0) {
+ must_unlink_(false) {
memset(input_buf_, 0, sizeof(input_buf_));
memset(input_cmsg_buf_, 0, sizeof(input_cmsg_buf_));
if (!CreatePipe(channel_handle)) {
@@ -729,14 +727,7 @@ bool Channel::ChannelImpl::ProcessIncomingMessages() {
CHECK(descriptor.auto_close);
}
#endif // IPC_USES_READWRITE
- if (needs_override_peer_pid_) {
- // If we already have the peer PID, use it. Otherwise we'll call
- // OnChannelConnected() in OverridePeerPid() below.
- if (override_peer_pid_ != 0)
- listener_->OnChannelConnected(override_peer_pid_);
- } else {
- listener_->OnChannelConnected(pid);
- }
+ listener_->OnChannelConnected(pid);
} else {
listener_->OnMessageReceived(m);
}
@@ -1002,27 +993,6 @@ void Channel::ChannelImpl::ResetToAcceptingConnectionState() {
input_overflow_fds_.clear();
}
-#if defined(OS_LINUX)
-void Channel::ChannelImpl::SetNeedsOverridePeerPid() {
- needs_override_peer_pid_ = true;
-}
-
-void Channel::ChannelImpl::OverridePeerPid(int32 peer_pid) {
- DCHECK(needs_override_peer_pid_);
- override_peer_pid_ = peer_pid;
-
- // The browser learns the global PID of the renderers on the UI thread, and
- // must post the data to the IO thread for us to use it here. Therefore
- // there is a race between the IPC channel processing the hello message
- // and this function being called. If fd_pipe_ != -1 then we've already
- // received the hello message and we skipped OnChannelConnected() above,
- // so call it here.
- if (fd_pipe_ != -1) {
- listener_->OnChannelConnected(peer_pid);
- }
-}
-#endif // defined(OS_LINUX)
-
// static
bool Channel::ChannelImpl::IsNamedServerInitialized(
const std::string& channel_id) {
@@ -1238,16 +1208,6 @@ void Channel::ResetToAcceptingConnectionState() {
channel_impl_->ResetToAcceptingConnectionState();
}
-#if defined(OS_LINUX)
-void Channel::SetNeedsOverridePeerPid() {
- channel_impl_->SetNeedsOverridePeerPid();
-}
-
-void Channel::OverridePeerPid(int32 peer_pid) {
- channel_impl_->OverridePeerPid(peer_pid);
-}
-#endif // defined(OS_LINUX)
-
// static
bool Channel::IsNamedServerInitialized(const std::string& channel_id) {
return ChannelImpl::IsNamedServerInitialized(channel_id);
« no previous file with comments | « ipc/ipc_channel_posix.h ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698