diff options
author | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-12 00:13:08 +0000 |
---|---|---|
committer | horo@chromium.org <horo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-12 00:14:30 +0000 |
commit | eaf23ff1fad227d8d4606158f6829a728e566024 (patch) | |
tree | 5530d69f29b076f9d731afe85fe172e10c779e0b /content | |
parent | f42a89bf72b95394a809894a8a1a43240760717f (diff) | |
download | chromium_src-eaf23ff1fad227d8d4606158f6829a728e566024.zip chromium_src-eaf23ff1fad227d8d4606158f6829a728e566024.tar.gz chromium_src-eaf23ff1fad227d8d4606158f6829a728e566024.tar.bz2 |
Remove shared worker process related codes.
This CL removes
- switches::kWorkerProcess
- SANDBOX_TYPE_WORKER
- IDR_WORKER_SANDBOX_PROFILE
BUG=327256
Review URL: https://codereview.chromium.org/449333002
Cr-Commit-Position: refs/heads/master@{#288836}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/worker.sb | 12 | ||||
-rw-r--r-- | content/common/sandbox_init_mac.cc | 3 | ||||
-rw-r--r-- | content/common/sandbox_linux/sandbox_linux.cc | 2 | ||||
-rw-r--r-- | content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc | 4 | ||||
-rw-r--r-- | content/common/sandbox_mac.mm | 1 | ||||
-rw-r--r-- | content/content_resources.grd | 1 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 | ||||
-rw-r--r-- | content/public/common/sandbox_type_mac.h | 6 |
9 files changed, 1 insertions, 32 deletions
diff --git a/content/browser/worker.sb b/content/browser/worker.sb deleted file mode 100644 index 2e40888..0000000 --- a/content/browser/worker.sb +++ /dev/null @@ -1,12 +0,0 @@ -;; -;; Copyright (c) 2011 The Chromium Authors. All rights reserved. -;; Use of this source code is governed by a BSD-style license that can be -;; found in the LICENSE file. -;; -; This is the Sandbox configuration file used for safeguarding the worker -; process which is used to run web workers in a sandboxed environment. -; -; This is the most restrictive sandbox profile and only enables just enough -; to allow basic use of Cocoa. - -; *** The contents of content/common/common.sb are implicitly included here. *** diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc index fd96041..6095179 100644 --- a/content/common/sandbox_init_mac.cc +++ b/content/common/sandbox_init_mac.cc @@ -48,9 +48,6 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type, *sandbox_type = SANDBOX_TYPE_UTILITY; *allowed_dir = command_line.GetSwitchValuePath(switches::kUtilityProcessAllowedDir); - } else if (process_type == switches::kWorkerProcess) { - // Worker process sandbox. - *sandbox_type = SANDBOX_TYPE_WORKER; } else if (process_type == switches::kGpuProcess) { if (command_line.HasSwitch(switches::kDisableGpuSandbox)) return false; diff --git a/content/common/sandbox_linux/sandbox_linux.cc b/content/common/sandbox_linux/sandbox_linux.cc index e15aa18..7c7c856 100644 --- a/content/common/sandbox_linux/sandbox_linux.cc +++ b/content/common/sandbox_linux/sandbox_linux.cc @@ -355,7 +355,6 @@ bool LinuxSandbox::LimitAddressSpace(const std::string& process_type) { // For now, increase limit to 16GB for renderer and worker and gpu processes // to accomodate. if (process_type == switches::kRendererProcess || - process_type == switches::kWorkerProcess || process_type == switches::kGpuProcess) { address_space_limit = 1L << 34; } @@ -394,7 +393,6 @@ void LinuxSandbox::CheckForBrokenPromises(const std::string& process_type) { // Make sure that any promise made with GetStatus() wasn't broken. bool promised_seccomp_bpf_would_start = false; if (process_type == switches::kRendererProcess || - process_type == switches::kWorkerProcess || process_type == switches::kPpapiPluginProcess) { promised_seccomp_bpf_would_start = (sandbox_status_flags_ != kSandboxLinuxInvalid) && diff --git a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc index c9fda1d..86d2c0f 100644 --- a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc +++ b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc @@ -114,7 +114,6 @@ ResultExpr AllowAllPolicy::EvaluateSyscall(int sysno) const { // If a BPF policy is engaged for |process_type|, run a few sanity checks. void RunSandboxSanityChecks(const std::string& process_type) { if (process_type == switches::kRendererProcess || - process_type == switches::kWorkerProcess || process_type == switches::kGpuProcess || process_type == switches::kPpapiPluginProcess) { int syscall_ret; @@ -181,8 +180,7 @@ bool StartBPFSandbox(const base::CommandLine& command_line, if (process_type == switches::kGpuProcess) { policy.reset(GetGpuProcessSandbox().release()); - } else if (process_type == switches::kRendererProcess || - process_type == switches::kWorkerProcess) { + } else if (process_type == switches::kRendererProcess) { policy.reset(new RendererProcessPolicy); } else if (process_type == switches::kPpapiPluginProcess) { policy.reset(new PpapiProcessPolicy); diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm index 88a4bcc..c7c1265 100644 --- a/content/common/sandbox_mac.mm +++ b/content/common/sandbox_mac.mm @@ -53,7 +53,6 @@ struct SandboxTypeToResourceIDMapping { // profile for all process types known to content. SandboxTypeToResourceIDMapping kDefaultSandboxTypeToResourceIDMapping[] = { { SANDBOX_TYPE_RENDERER, IDR_RENDERER_SANDBOX_PROFILE }, - { SANDBOX_TYPE_WORKER, IDR_WORKER_SANDBOX_PROFILE }, { SANDBOX_TYPE_UTILITY, IDR_UTILITY_SANDBOX_PROFILE }, { SANDBOX_TYPE_GPU, IDR_GPU_SANDBOX_PROFILE }, { SANDBOX_TYPE_PPAPI, IDR_PPAPI_SANDBOX_PROFILE }, diff --git a/content/content_resources.grd b/content/content_resources.grd index 595aed6..6b0b7b6 100644 --- a/content/content_resources.grd +++ b/content/content_resources.grd @@ -32,7 +32,6 @@ <include name="IDR_WEBRTC_INTERNALS_JS" file="browser/resources/media/webrtc_internals.js" flattenhtml="true" type="BINDATA" /> <if expr="is_macosx"> <include name="IDR_GPU_SANDBOX_PROFILE" file="browser/gpu.sb" type="BINDATA" /> - <include name="IDR_WORKER_SANDBOX_PROFILE" file="browser/worker.sb" type="BINDATA" /> <include name="IDR_COMMON_SANDBOX_PROFILE" file="common/common.sb" type="BINDATA" /> <include name="IDR_PPAPI_SANDBOX_PROFILE" file="ppapi_plugin/ppapi.sb" type="BINDATA" /> <include name="IDR_RENDERER_SANDBOX_PROFILE" file="renderer/renderer.sb" type="BINDATA" /> diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 1bc2a24..a9cf52f 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -851,9 +851,6 @@ const char kValidateInputEventStream[] = "validate-input-event-stream"; // kWaitForDebugger flag passed on or not. const char kWaitForDebuggerChildren[] = "wait-for-debugger-children"; -// Causes the process to run as a worker subprocess. -const char kWorkerProcess[] = "worker"; - // The prefix used when starting the zygote process. (i.e. 'gdb --args') const char kZygoteCmdPrefix[] = "zygote-cmd-prefix"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 47b5fdc..8a19213 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -235,7 +235,6 @@ CONTENT_EXPORT extern const char kUtilityProcessEnableMDns[]; CONTENT_EXPORT extern const char kUtilityProcessRunningElevated[]; CONTENT_EXPORT extern const char kValidateInputEventStream[]; CONTENT_EXPORT extern const char kWaitForDebuggerChildren[]; -CONTENT_EXPORT extern const char kWorkerProcess[]; CONTENT_EXPORT extern const char kZygoteCmdPrefix[]; CONTENT_EXPORT extern const char kZygoteProcess[]; diff --git a/content/public/common/sandbox_type_mac.h b/content/public/common/sandbox_type_mac.h index 4c7faaa..6f8a6f0e 100644 --- a/content/public/common/sandbox_type_mac.h +++ b/content/public/common/sandbox_type_mac.h @@ -18,12 +18,6 @@ enum SandboxType { SANDBOX_TYPE_RENDERER = SANDBOX_TYPE_FIRST_TYPE, - // The worker process uses the most restrictive sandbox which has almost - // *everything* locked down. Only a couple of /System/Library/ paths and - // some other very basic operations (e.g., reading metadata to allow - // following symlinks) are permitted. - SANDBOX_TYPE_WORKER, - // Utility process is as restrictive as the worker process except full // access is allowed to one configurable directory. SANDBOX_TYPE_UTILITY, |