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

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

Issue 3162047: FBTF: Move some heavy, repeatedly emitted symbols to implementation files. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: mac fixes Created 10 years, 3 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/nacl/nacl_main_platform_delegate_mac.mm » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/common/sandbox_init_wrapper.h" 5 #include "chrome/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 "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/sandbox_mac.h" 11 #include "chrome/common/sandbox_mac.h"
11 12
12 bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line, 13 bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
13 const std::string& process_type) { 14 const std::string& process_type) {
14 if (command_line.HasSwitch(switches::kNoSandbox)) 15 if (command_line.HasSwitch(switches::kNoSandbox))
15 return true; 16 return true;
16 17
17 sandbox::SandboxProcessType sandbox_process_type; 18 sandbox::SandboxProcessType sandbox_process_type;
18 FilePath allowed_dir; // Empty by default. 19 FilePath allowed_dir; // Empty by default.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 NOTREACHED(); 62 NOTREACHED();
62 return true; 63 return true;
63 } 64 }
64 65
65 // Warm up APIs before turning on the sandbox. 66 // Warm up APIs before turning on the sandbox.
66 sandbox::SandboxWarmup(); 67 sandbox::SandboxWarmup();
67 68
68 // Actually sandbox the process. 69 // Actually sandbox the process.
69 return sandbox::EnableSandbox(sandbox_process_type, allowed_dir); 70 return sandbox::EnableSandbox(sandbox_process_type, allowed_dir);
70 } 71 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/nacl/nacl_main_platform_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698