| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index db5ea5d7a4f71b2d7cb1e95f9a9fff93aee979b7..d14c587c424841d98a7210b28c3042878cbb238e 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -345,23 +345,11 @@ class RendererSandboxedProcessLauncherDelegate
|
| void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override {
|
| AddBaseHandleClosePolicy(policy);
|
|
|
| - if (base::win::GetVersion() == base::win::VERSION_WIN8 ||
|
| - base::win::GetVersion() == base::win::VERSION_WIN8_1) {
|
| - const base::CommandLine& command_line =
|
| - *base::CommandLine::ForCurrentProcess();
|
| - if (!command_line.HasSwitch(switches::kDisableAppContainer)) {
|
| - // TODO(shrikant): Check if these constants should be different across
|
| - // various versions of Chromium code base or could be same.
|
| - // If there should be different SID per channel then move this code
|
| - // in chrome rather than content and assign SID based on
|
| - // VersionInfo::GetChannel().
|
| - const wchar_t kAppContainerSid[] =
|
| - L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-"
|
| - L"924012148-129201922";
|
| -
|
| - policy->SetLowBox(kAppContainerSid);
|
| - }
|
| - }
|
| + const base::string16& sid =
|
| + GetContentClient()->browser()->GetAppContainerSidForSandboxType(
|
| + GetSandboxType());
|
| + if (!sid.empty())
|
| + MaybeAddAppContainerPolicy(policy, sid.c_str());
|
|
|
| GetContentClient()->browser()->PreSpawnRenderer(policy, success);
|
| }
|
| @@ -377,6 +365,10 @@ class RendererSandboxedProcessLauncherDelegate
|
| base::ScopedFD TakeIpcFd() override { return ipc_fd_.Pass(); }
|
| #endif // OS_WIN
|
|
|
| + SandboxType GetSandboxType() override {
|
| + return SANDBOX_TYPE_RENDERER;
|
| + }
|
| +
|
| private:
|
| #if defined(OS_POSIX)
|
| base::ScopedFD ipc_fd_;
|
|
|