summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 18:34:20 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 18:34:20 +0000
commit52356d21dd088abc0bf57303ceb5399c7cd998ef (patch)
tree5a36808d51449c3eaeaff102a20d99f01735d685 /content
parent62de8837965ca7ad93bdd72f4061b3243ab5731d (diff)
downloadchromium_src-52356d21dd088abc0bf57303ceb5399c7cd998ef.zip
chromium_src-52356d21dd088abc0bf57303ceb5399c7cd998ef.tar.gz
chromium_src-52356d21dd088abc0bf57303ceb5399c7cd998ef.tar.bz2
Remove render_sandbox_host_linux.h include from chrome. It was only used to get the pid of that process, so added a method to the ZygoteHost interface to return it instead.
BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9536019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124209 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/zygote_host_impl_linux.cc4
-rw-r--r--content/browser/zygote_host_impl_linux.h1
-rw-r--r--content/public/browser/zygote_host_linux.h4
3 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/zygote_host_impl_linux.cc b/content/browser/zygote_host_impl_linux.cc
index b2d9380..7a1818d 100644
--- a/content/browser/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host_impl_linux.cc
@@ -454,6 +454,10 @@ pid_t ZygoteHostImpl::GetPid() const {
return pid_;
}
+pid_t ZygoteHostImpl::GetSandboxHelperPid() const {
+ return RenderSandboxHostLinux::GetInstance()->pid();
+}
+
int ZygoteHostImpl::GetSandboxStatus() const {
if (have_read_sandbox_status_word_)
return sandbox_status_;
diff --git a/content/browser/zygote_host_impl_linux.h b/content/browser/zygote_host_impl_linux.h
index 739cac6..3c6e824 100644
--- a/content/browser/zygote_host_impl_linux.h
+++ b/content/browser/zygote_host_impl_linux.h
@@ -51,6 +51,7 @@ class CONTENT_EXPORT ZygoteHostImpl : public content::ZygoteHost {
// ZygoteHost implementation:
virtual pid_t GetPid() const OVERRIDE;
+ virtual pid_t GetSandboxHelperPid() const OVERRIDE;
virtual int GetSandboxStatus() const OVERRIDE;
virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle,
int score) OVERRIDE;
diff --git a/content/public/browser/zygote_host_linux.h b/content/public/browser/zygote_host_linux.h
index 48cd8a9..2b79b30 100644
--- a/content/public/browser/zygote_host_linux.h
+++ b/content/public/browser/zygote_host_linux.h
@@ -31,8 +31,12 @@ class ZygoteHost {
kSandboxSeccomp = 1 << 3, // seccomp sandbox active.
};
+ // Returns the pid of the Zygote process.
virtual pid_t GetPid() const = 0;
+ // Returns the pid of the Sandbox Helper process.
+ virtual pid_t GetSandboxHelperPid() const = 0;
+
// Returns an int which is a bitmask of kSandbox* values. Only valid after
// the first render has been forked.
virtual int GetSandboxStatus() const = 0;