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

Side by Side Diff: chrome/renderer/renderer_main_platform_delegate_linux.cc

Issue 6878002: Move renderer_main and renderer_glue to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/renderer/renderer_main_platform_delegate.h"
6
7 #include "base/command_line.h"
8 #include "seccompsandbox/sandbox.h"
9
10 #include "chrome/common/chrome_switches.h"
11
12 RendererMainPlatformDelegate::RendererMainPlatformDelegate(
13 const MainFunctionParams& parameters)
14 : parameters_(parameters) {
15 }
16
17 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
18 }
19
20 void RendererMainPlatformDelegate::PlatformInitialize() {
21 }
22
23 void RendererMainPlatformDelegate::PlatformUninitialize() {
24 }
25
26 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
27 // The sandbox is started in the zygote process: zygote_main_linux.cc
28 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
29 return true;
30 }
31
32 bool RendererMainPlatformDelegate::EnableSandbox() {
33 // The setuid sandbox is started in the zygote process: zygote_main_linux.cc
34 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
35 //
36 // The seccomp sandbox is started in the renderer.
37 // http://code.google.com/p/seccompsandbox/
38 #if defined(ARCH_CPU_X86_FAMILY) && !defined(CHROMIUM_SELINUX) && \
39 !defined(__clang__)
40 // N.b. SupportsSeccompSandbox() returns a cached result, as we already
41 // called it earlier in the zygote. Thus, it is OK for us to not pass in
42 // a file descriptor for "/proc".
43 if (CommandLine::ForCurrentProcess()->HasSwitch(
44 switches::kEnableSeccompSandbox) && SupportsSeccompSandbox(-1))
45 StartSeccompSandbox();
46 #endif
47 return true;
48 }
49
50 void RendererMainPlatformDelegate::RunSandboxTests() {
51 // The sandbox is started in the zygote process: zygote_main_linux.cc
52 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox
53 }
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_main_platform_delegate.h ('k') | chrome/renderer/renderer_main_platform_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698