diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 19:08:35 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-17 19:08:35 +0000 |
commit | 1f0944969056e5fa1eb6caf35445439deb9e840f (patch) | |
tree | fea7565e80132a3c01cd17df6885024c12d44c97 /chrome/common | |
parent | fa990bb1e3c09ffb4f47418fcad2b8f6d322a75a (diff) | |
download | chromium_src-1f0944969056e5fa1eb6caf35445439deb9e840f.zip chromium_src-1f0944969056e5fa1eb6caf35445439deb9e840f.tar.gz chromium_src-1f0944969056e5fa1eb6caf35445439deb9e840f.tar.bz2 |
Store the process type in the mac sandbox wrapper so we can can check it during
actual sandbox setup (to tell if we're a unittest vs. real chromium process).
Review URL: http://codereview.chromium.org/20425
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9894 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/sandbox_init_wrapper.cc | 6 | ||||
-rw-r--r-- | chrome/common/sandbox_init_wrapper.h | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chrome/common/sandbox_init_wrapper.cc b/chrome/common/sandbox_init_wrapper.cc index e7228aa..6fcf664 100644 --- a/chrome/common/sandbox_init_wrapper.cc +++ b/chrome/common/sandbox_init_wrapper.cc @@ -31,8 +31,10 @@ void SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, #if defined(OS_WIN) target_services_->Init(); #elif defined(OS_MACOSX) - // Nothing to do here for OS X, see renderer_main_platform_delegate_mac.cc - // For Sandbox initialization. + // We just cache the process type so we can configure the sandbox + // correctly, see renderer_main_platform_delegate_mac.cc for one of those + // places. + process_type_ = process_type; #endif } } diff --git a/chrome/common/sandbox_init_wrapper.h b/chrome/common/sandbox_init_wrapper.h index 27cfacd..e9a718a 100644 --- a/chrome/common/sandbox_init_wrapper.h +++ b/chrome/common/sandbox_init_wrapper.h @@ -53,6 +53,14 @@ class SandboxInitWrapper { void InitializeSandbox(const CommandLine& parsed_command_line, const std::wstring& process_type); +#if defined(OS_MACOSX) + // We keep the process type so we can configure the sandbox as needed. + public: + std::wstring ProcessType() const { return process_type_; } + private: + std::wstring process_type_; +#endif + private: DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper); }; |