summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/sandbox_init_wrapper.cc6
-rw-r--r--chrome/common/sandbox_init_wrapper.h8
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);
};