Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1415483008: Get rid of SandboxedProcessLauncherDelegate::PreSandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove curly braces Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 explicit RendererSandboxedProcessLauncherDelegate(IPC::ChannelProxy* channel) 360 explicit RendererSandboxedProcessLauncherDelegate(IPC::ChannelProxy* channel)
361 #if defined(OS_POSIX) 361 #if defined(OS_POSIX)
362 : ipc_fd_(channel->TakeClientFileDescriptor()) 362 : ipc_fd_(channel->TakeClientFileDescriptor())
363 #endif // OS_POSIX 363 #endif // OS_POSIX
364 { 364 {
365 } 365 }
366 366
367 ~RendererSandboxedProcessLauncherDelegate() override {} 367 ~RendererSandboxedProcessLauncherDelegate() override {}
368 368
369 #if defined(OS_WIN) 369 #if defined(OS_WIN)
370 void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override { 370 bool PreSpawnTarget(sandbox::TargetPolicy* policy) override {
371 AddBaseHandleClosePolicy(policy); 371 AddBaseHandleClosePolicy(policy);
372 372
373 const base::string16& sid = 373 const base::string16& sid =
374 GetContentClient()->browser()->GetAppContainerSidForSandboxType( 374 GetContentClient()->browser()->GetAppContainerSidForSandboxType(
375 GetSandboxType()); 375 GetSandboxType());
376 if (!sid.empty()) 376 if (!sid.empty())
377 AddAppContainerPolicy(policy, sid.c_str()); 377 AddAppContainerPolicy(policy, sid.c_str());
378 378
379 GetContentClient()->browser()->PreSpawnRenderer(policy, success); 379 return GetContentClient()->browser()->PreSpawnRenderer(policy);
380 } 380 }
381 381
382 #elif defined(OS_POSIX) 382 #elif defined(OS_POSIX)
383 bool ShouldUseZygote() override { 383 bool ShouldUseZygote() override {
384 const base::CommandLine& browser_command_line = 384 const base::CommandLine& browser_command_line =
385 *base::CommandLine::ForCurrentProcess(); 385 *base::CommandLine::ForCurrentProcess();
386 base::CommandLine::StringType renderer_prefix = 386 base::CommandLine::StringType renderer_prefix =
387 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); 387 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
388 return renderer_prefix.empty(); 388 return renderer_prefix.empty();
389 } 389 }
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2633 void RenderProcessHostImpl::GetAudioOutputControllers( 2633 void RenderProcessHostImpl::GetAudioOutputControllers(
2634 const GetAudioOutputControllersCallback& callback) const { 2634 const GetAudioOutputControllersCallback& callback) const {
2635 audio_renderer_host()->GetOutputControllers(callback); 2635 audio_renderer_host()->GetOutputControllers(callback);
2636 } 2636 }
2637 2637
2638 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2638 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2639 return bluetooth_dispatcher_host_.get(); 2639 return bluetooth_dispatcher_host_.get();
2640 } 2640 }
2641 2641
2642 } // namespace content 2642 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698