| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 332 |
| 333 ~RendererSandboxedProcessLauncherDelegate() override {} | 333 ~RendererSandboxedProcessLauncherDelegate() override {} |
| 334 | 334 |
| 335 #if defined(OS_WIN) | 335 #if defined(OS_WIN) |
| 336 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, | 336 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, |
| 337 bool* success) { | 337 bool* success) { |
| 338 AddBaseHandleClosePolicy(policy); | 338 AddBaseHandleClosePolicy(policy); |
| 339 | 339 |
| 340 if (base::win::GetVersion() == base::win::VERSION_WIN8 || | 340 if (base::win::GetVersion() == base::win::VERSION_WIN8 || |
| 341 base::win::GetVersion() == base::win::VERSION_WIN8_1) { | 341 base::win::GetVersion() == base::win::VERSION_WIN8_1) { |
| 342 // TODO(shrikant): Check if these constants should be different across | 342 const base::CommandLine& command_line = |
| 343 // various versions of Chromium code base or could be same. | 343 *base::CommandLine::ForCurrentProcess(); |
| 344 // If there should be different SID per channel then move this code | 344 if (!command_line.HasSwitch(switches::kDisableAppContainer)) { |
| 345 // in chrome rather than content and assign SID based on | 345 // TODO(shrikant): Check if these constants should be different across |
| 346 // VersionInfo::GetChannel(). | 346 // various versions of Chromium code base or could be same. |
| 347 const wchar_t kAppContainerSid[] = | 347 // If there should be different SID per channel then move this code |
| 348 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" | 348 // in chrome rather than content and assign SID based on |
| 349 L"924012148-129201922"; | 349 // VersionInfo::GetChannel(). |
| 350 const wchar_t kAppContainerSid[] = |
| 351 L"S-1-15-2-3251537155-1984446955-2931258699-841473695-1938553385-" |
| 352 L"924012148-129201922"; |
| 350 | 353 |
| 351 policy->SetLowBox(kAppContainerSid); | 354 policy->SetLowBox(kAppContainerSid); |
| 355 } |
| 352 } | 356 } |
| 353 | 357 |
| 354 GetContentClient()->browser()->PreSpawnRenderer(policy, success); | 358 GetContentClient()->browser()->PreSpawnRenderer(policy, success); |
| 355 } | 359 } |
| 356 | 360 |
| 357 #elif defined(OS_POSIX) | 361 #elif defined(OS_POSIX) |
| 358 bool ShouldUseZygote() override { | 362 bool ShouldUseZygote() override { |
| 359 const base::CommandLine& browser_command_line = | 363 const base::CommandLine& browser_command_line = |
| 360 *base::CommandLine::ForCurrentProcess(); | 364 *base::CommandLine::ForCurrentProcess(); |
| 361 base::CommandLine::StringType renderer_prefix = | 365 base::CommandLine::StringType renderer_prefix = |
| (...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 if (worker_ref_count_ == 0) | 2488 if (worker_ref_count_ == 0) |
| 2485 Cleanup(); | 2489 Cleanup(); |
| 2486 } | 2490 } |
| 2487 | 2491 |
| 2488 void RenderProcessHostImpl::GetAudioOutputControllers( | 2492 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2489 const GetAudioOutputControllersCallback& callback) const { | 2493 const GetAudioOutputControllersCallback& callback) const { |
| 2490 audio_renderer_host()->GetOutputControllers(callback); | 2494 audio_renderer_host()->GetOutputControllers(callback); |
| 2491 } | 2495 } |
| 2492 | 2496 |
| 2493 } // namespace content | 2497 } // namespace content |
| OLD | NEW |