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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 : ipc_fd_(channel->TakeClientFileDescriptor()) | 317 : ipc_fd_(channel->TakeClientFileDescriptor()) |
318 #endif // OS_POSIX | 318 #endif // OS_POSIX |
319 {} | 319 {} |
320 | 320 |
321 ~RendererSandboxedProcessLauncherDelegate() override {} | 321 ~RendererSandboxedProcessLauncherDelegate() override {} |
322 | 322 |
323 #if defined(OS_WIN) | 323 #if defined(OS_WIN) |
324 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, | 324 virtual void PreSpawnTarget(sandbox::TargetPolicy* policy, |
325 bool* success) { | 325 bool* success) { |
326 AddBaseHandleClosePolicy(policy); | 326 AddBaseHandleClosePolicy(policy); |
| 327 |
| 328 AddAppContainerPolicy(policy); |
| 329 |
327 GetContentClient()->browser()->PreSpawnRenderer(policy, success); | 330 GetContentClient()->browser()->PreSpawnRenderer(policy, success); |
328 } | 331 } |
329 | 332 |
330 #elif defined(OS_POSIX) | 333 #elif defined(OS_POSIX) |
331 bool ShouldUseZygote() override { | 334 bool ShouldUseZygote() override { |
332 const base::CommandLine& browser_command_line = | 335 const base::CommandLine& browser_command_line = |
333 *base::CommandLine::ForCurrentProcess(); | 336 *base::CommandLine::ForCurrentProcess(); |
334 base::CommandLine::StringType renderer_prefix = | 337 base::CommandLine::StringType renderer_prefix = |
335 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 338 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
336 return renderer_prefix.empty(); | 339 return renderer_prefix.empty(); |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 | 2365 |
2363 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2366 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2364 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2367 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2365 DCHECK_GT(worker_ref_count_, 0); | 2368 DCHECK_GT(worker_ref_count_, 0); |
2366 --worker_ref_count_; | 2369 --worker_ref_count_; |
2367 if (worker_ref_count_ == 0) | 2370 if (worker_ref_count_ == 0) |
2368 Cleanup(); | 2371 Cleanup(); |
2369 } | 2372 } |
2370 | 2373 |
2371 } // namespace content | 2374 } // namespace content |
OLD | NEW |