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

Side by Side Diff: content/common/sandbox_init_win.cc

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) Created 8 years, 5 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
« no previous file with comments | « content/common/handle_enumerator_win.cc ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/public/common/sandbox_init.h" 5 #include "content/public/common/sandbox_init.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/common/sandbox_policy.h" 9 #include "content/common/sandbox_policy.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
11 #include "sandbox/src/sandbox.h" 11 #include "sandbox/win/src/sandbox.h"
12 #include "sandbox/src/sandbox_types.h" 12 #include "sandbox/win/src/sandbox_types.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 bool InitializeSandbox( 16 bool InitializeSandbox(
17 sandbox::SandboxInterfaceInfo* sandbox_info) { 17 sandbox::SandboxInterfaceInfo* sandbox_info) {
18 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 18 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
19 std::string process_type = 19 std::string process_type =
20 command_line.GetSwitchValueASCII(switches::kProcessType); 20 command_line.GetSwitchValueASCII(switches::kProcessType);
21 sandbox::BrokerServices* broker_services = sandbox_info->broker_services; 21 sandbox::BrokerServices* broker_services = sandbox_info->broker_services;
22 if (broker_services && (process_type.empty() || 22 if (broker_services && (process_type.empty() ||
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } else { 60 } else {
61 // Other process types might or might not be sandboxed. 61 // Other process types might or might not be sandboxed.
62 // TODO(cpu): clean this mess. 62 // TODO(cpu): clean this mess.
63 if (!target_services) 63 if (!target_services)
64 return true; 64 return true;
65 } 65 }
66 return sandbox::InitTargetServices(target_services); 66 return sandbox::InitTargetServices(target_services);
67 } 67 }
68 68
69 } // namespace content 69 } // namespace content
OLDNEW
« no previous file with comments | « content/common/handle_enumerator_win.cc ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698