| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 #endif // OS_POSIX | 336 #endif // OS_POSIX |
| 337 {} | 337 {} |
| 338 | 338 |
| 339 ~RendererSandboxedProcessLauncherDelegate() override {} | 339 ~RendererSandboxedProcessLauncherDelegate() override {} |
| 340 | 340 |
| 341 #if defined(OS_WIN) | 341 #if defined(OS_WIN) |
| 342 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, | 342 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, |
| 343 bool* success) { | 343 bool* success) { |
| 344 AddBaseHandleClosePolicy(policy); | 344 AddBaseHandleClosePolicy(policy); |
| 345 | 345 |
| 346 if (base::win::GetVersion() == base::win::VERSION_WIN8 || | |
| 347 base::win::GetVersion() == base::win::VERSION_WIN8_1) { | |
| 348 // TODO(shrikant): Check if these constants should be different across | |
| 349 // various versions of Chromium code base or could be same. | |
| 350 // If there should be different SID per channel then move this code | |
| 351 // in chrome rather than content and assign SID based on | |
| 352 // VersionInfo::GetChannel(). | |
| 353 const wchar_t kAppContainerSid[] = | |
| 354 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" | |
| 355 L"924012148-129201922"; | |
| 356 | |
| 357 policy->SetLowBox(kAppContainerSid); | |
| 358 } | |
| 359 | |
| 360 GetContentClient()->browser()->PreSpawnRenderer(policy, success); | 346 GetContentClient()->browser()->PreSpawnRenderer(policy, success); |
| 361 } | 347 } |
| 362 | 348 |
| 363 #elif defined(OS_POSIX) | 349 #elif defined(OS_POSIX) |
| 364 bool ShouldUseZygote() override { | 350 bool ShouldUseZygote() override { |
| 365 const base::CommandLine& browser_command_line = | 351 const base::CommandLine& browser_command_line = |
| 366 *base::CommandLine::ForCurrentProcess(); | 352 *base::CommandLine::ForCurrentProcess(); |
| 367 base::CommandLine::StringType renderer_prefix = | 353 base::CommandLine::StringType renderer_prefix = |
| 368 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 354 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
| 369 return renderer_prefix.empty(); | 355 return renderer_prefix.empty(); |
| (...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2490 if (worker_ref_count_ == 0) | 2476 if (worker_ref_count_ == 0) |
| 2491 Cleanup(); | 2477 Cleanup(); |
| 2492 } | 2478 } |
| 2493 | 2479 |
| 2494 void RenderProcessHostImpl::GetAudioOutputControllers( | 2480 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2495 const GetAudioOutputControllersCallback& callback) const { | 2481 const GetAudioOutputControllersCallback& callback) const { |
| 2496 audio_renderer_host()->GetOutputControllers(callback); | 2482 audio_renderer_host()->GetOutputControllers(callback); |
| 2497 } | 2483 } |
| 2498 | 2484 |
| 2499 } // namespace content | 2485 } // namespace content |
| OLD | NEW |