From f30a566d7fcc4c56004f40e9db160906bdf9ac8c Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Fri, 13 Nov 2009 22:06:41 +0000 Subject: 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 --- chrome/common/chrome_switches.cc | 3 +++ chrome/common/chrome_switches.h | 1 + chrome/common/sandbox_init_wrapper_mac.cc | 3 +++ chrome/common/sandbox_init_wrapper_win.cc | 1 + 4 files changed, 8 insertions(+) (limited to 'chrome/common') 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) || -- cgit v1.1