summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 22:06:41 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 22:06:41 +0000
commitf30a566d7fcc4c56004f40e9db160906bdf9ac8c (patch)
treec0d6b4c308cf7853205717a63b27ea8ce276a93b /chrome/common
parent6e5e54e39d8e542077acdafe8cf9033b1ca9acce (diff)
downloadchromium_src-f30a566d7fcc4c56004f40e9db160906bdf9ac8c.zip
chromium_src-f30a566d7fcc4c56004f40e9db160906bdf9ac8c.tar.gz
chromium_src-f30a566d7fcc4c56004f40e9db160906bdf9ac8c.tar.bz2
Add an "extension" process type, which mostly gets treated as a renderer everywhere.
BUG=27163 Review URL: http://codereview.chromium.org/384108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/sandbox_init_wrapper_mac.cc3
-rw-r--r--chrome/common/sandbox_init_wrapper_win.cc1
4 files changed, 8 insertions, 0 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index d4230bc..839ef92 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -259,6 +259,9 @@ const char kExperimentalSpellcheckerFeatures[] =
// numbers.
const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
+// Causes the process to run as an extension subprocess.
+const char kExtensionProcess[] = "extension";
+
// Frequency in seconds for Extensions auto-update.
const char kExtensionsUpdateFrequency[] = "extensions-update-frequency";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index d778e3d..b276a09 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -87,6 +87,7 @@ extern const char kEnableUserScripts[];
extern const char kEnableWatchdog[];
extern const char kExperimentalSpellcheckerFeatures[];
extern const char kExplicitlyAllowedPorts[];
+extern const char kExtensionProcess[];
extern const char kExtensionsUpdateFrequency[];
extern const char kFileDescriptorLimit[];
extern const char kFirstRun[];
diff --git a/chrome/common/sandbox_init_wrapper_mac.cc b/chrome/common/sandbox_init_wrapper_mac.cc
index 6ce09d3..b57727b 100644
--- a/chrome/common/sandbox_init_wrapper_mac.cc
+++ b/chrome/common/sandbox_init_wrapper_mac.cc
@@ -22,6 +22,9 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
} else if (process_type == switches::kRendererProcess) {
// Renderer process sandbox.
sandbox_process_type = sandbox::SANDBOX_TYPE_RENDERER;
+ } else if (process_type == switches::kExtensionProcess) {
+ // Extension process sandbox.
+ sandbox_process_type = sandbox::SANDBOX_TYPE_RENDERER;
} else if (process_type == switches::kUtilityProcess) {
// Utility process sandbox.
sandbox_process_type = sandbox::SANDBOX_TYPE_UTILITY;
diff --git a/chrome/common/sandbox_init_wrapper_win.cc b/chrome/common/sandbox_init_wrapper_win.cc
index fe5c6df..0bfba24 100644
--- a/chrome/common/sandbox_init_wrapper_win.cc
+++ b/chrome/common/sandbox_init_wrapper_win.cc
@@ -19,6 +19,7 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
if (command_line.HasSwitch(switches::kNoSandbox))
return true;
if ((process_type == switches::kRendererProcess) ||
+ (process_type == switches::kExtensionProcess) ||
(process_type == switches::kWorkerProcess) ||
(process_type == switches::kNaClProcess) ||
(process_type == switches::kUtilityProcess) ||