summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-23 03:17:02 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-23 03:17:02 +0000
commitbf84c589154a261c540ba514a0cbf600d77e3c9f (patch)
treef42157e456d3ad08eda83340ed3545634ede05c0 /content
parent09ba32619bab580cf09824850a3c86b10689894c (diff)
downloadchromium_src-bf84c589154a261c540ba514a0cbf600d77e3c9f.zip
chromium_src-bf84c589154a261c540ba514a0cbf600d77e3c9f.tar.gz
chromium_src-bf84c589154a261c540ba514a0cbf600d77e3c9f.tar.bz2
This patch caused Chrome to be unable to load any web pages on Chrome OS.
BUG=chromium-os:19468 TEST=confirm chrome loads pages Revert "Fix IPC OnChannelConnected() to send correct PID on Linux/CrOS" This reverts commit 92321e01ba42f2d0e9508e921f8b440ac0b5319f. Review URL: http://codereview.chromium.org/7712022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/browser_child_process_host.cc13
-rw-r--r--content/browser/renderer_host/browser_render_process_host.cc20
2 files changed, 4 insertions, 29 deletions
diff --git a/content/browser/browser_child_process_host.cc b/content/browser/browser_child_process_host.cc
index 97e1220..40b6598 100644
--- a/content/browser/browser_child_process_host.cc
+++ b/content/browser/browser_child_process_host.cc
@@ -83,10 +83,6 @@ void BrowserChildProcessHost::Launch(
content::GetContentClient()->browser()->AppendExtraCommandLineSwitches(
cmd_line, id());
-#if defined(OS_LINUX)
- channel()->SetNeedsOverridePeerPid();
-#endif
-
child_process_.reset(new ChildProcessLauncher(
#if defined(OS_WIN)
exposed_dir,
@@ -171,16 +167,11 @@ BrowserChildProcessHost::ClientHook::ClientHook(BrowserChildProcessHost* host)
}
void BrowserChildProcessHost::ClientHook::OnProcessLaunched() {
- base::ProcessHandle child_handle = host_->child_process_->GetHandle();
- if (!child_handle) {
+ if (!host_->child_process_->GetHandle()) {
host_->OnChildDied();
return;
}
- host_->set_handle(child_handle);
-#if defined(OS_LINUX)
- int32 child_pid = base::GetProcId(child_handle);
- host_->channel()->OverridePeerPid(child_pid);
-#endif
+ host_->set_handle(host_->child_process_->GetHandle());
host_->OnProcessLaunched();
}
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc
index 3b06191..256fb91 100644
--- a/content/browser/renderer_host/browser_render_process_host.cc
+++ b/content/browser/renderer_host/browser_render_process_host.cc
@@ -280,16 +280,9 @@ bool BrowserRenderProcessHost::Init(bool is_accessibility_enabled) {
// Setup the IPC channel.
const std::string channel_id =
ChildProcessInfo::GenerateRandomChannelID(this);
-#if defined(OS_LINUX)
- // See IPC::Channel::SetNeedsOverridePeerPid() for details.
- const bool needs_override_peer_pid = true;
-#else
- const bool needs_override_peer_pid = false;
-#endif
channel_.reset(new IPC::ChannelProxy(
channel_id, IPC::Channel::MODE_SERVER, this,
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- needs_override_peer_pid));
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
// Call the embedder first so that their IPC filters have priority.
content::GetContentClient()->browser()->BrowserRenderProcessHostCreated(this);
@@ -898,17 +891,8 @@ void BrowserRenderProcessHost::OnProcessLaunched() {
if (deleting_soon_)
return;
- if (child_process_launcher_.get()) {
+ if (child_process_launcher_.get())
child_process_launcher_->SetProcessBackgrounded(backgrounded_);
-#if defined(OS_LINUX)
- // Inform the IPC subsystem of the global PID for this sandboxed renderer.
- if (channel_.get()) {
- base::ProcessHandle child_handle = child_process_launcher_->GetHandle();
- base::ProcessId child_pid = base::GetProcId(child_handle);
- channel_->OverridePeerPid(child_pid);
- }
-#endif
- }
if (max_page_id_ != -1)
Send(new ViewMsg_SetNextPageID(max_page_id_ + 1));