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

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

Issue 8277018: Move content_switches to content\public\common. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/pepper_plugin_registry.cc ('k') | content/common/sandbox_init_wrapper_win.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/sandbox_init_wrapper.h" 5 #include "content/common/sandbox_init_wrapper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/common/content_switches.h"
11 #include "content/common/sandbox_mac.h" 10 #include "content/common/sandbox_mac.h"
11 #include "content/public/common/content_switches.h"
12 12
13 bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, 13 bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
14 const std::string& process_type) { 14 const std::string& process_type) {
15 using sandbox::Sandbox; 15 using sandbox::Sandbox;
16 16
17 if (command_line.HasSwitch(switches::kNoSandbox)) 17 if (command_line.HasSwitch(switches::kNoSandbox))
18 return true; 18 return true;
19 19
20 Sandbox::SandboxProcessType sandbox_process_type; 20 Sandbox::SandboxProcessType sandbox_process_type;
21 FilePath allowed_dir; // Empty by default. 21 FilePath allowed_dir; // Empty by default.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 NOTREACHED() << "Unknown process type " << process_type; 58 NOTREACHED() << "Unknown process type " << process_type;
59 return true; 59 return true;
60 } 60 }
61 61
62 // Warm up APIs before turning on the sandbox. 62 // Warm up APIs before turning on the sandbox.
63 Sandbox::SandboxWarmup(sandbox_process_type); 63 Sandbox::SandboxWarmup(sandbox_process_type);
64 64
65 // Actually sandbox the process. 65 // Actually sandbox the process.
66 return Sandbox::EnableSandbox(sandbox_process_type, allowed_dir); 66 return Sandbox::EnableSandbox(sandbox_process_type, allowed_dir);
67 } 67 }
OLDNEW
« no previous file with comments | « content/common/pepper_plugin_registry.cc ('k') | content/common/sandbox_init_wrapper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698