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

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

Issue 2001009: Created a new process type called the service process to host background task... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « chrome/common/chrome_switches.cc ('k') | chrome/service/cloud_print/cloud_print_proxy.h » ('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) 2009 The Chromium Authors. All rights reserved. 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 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 "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/sandbox_mac.h" 9 #include "chrome/common/sandbox_mac.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 allowed_dir = FilePath::FromWStringHack( 52 allowed_dir = FilePath::FromWStringHack(
53 command_line.GetSwitchValue(switches::kUtilityProcessAllowedDir)); 53 command_line.GetSwitchValue(switches::kUtilityProcessAllowedDir));
54 } else if (process_type == switches::kWorkerProcess) { 54 } else if (process_type == switches::kWorkerProcess) {
55 // Worker process sandbox. 55 // Worker process sandbox.
56 sandbox_process_type = sandbox::SANDBOX_TYPE_WORKER; 56 sandbox_process_type = sandbox::SANDBOX_TYPE_WORKER;
57 } else if (process_type == switches::kNaClLoaderProcess) { 57 } else if (process_type == switches::kNaClLoaderProcess) {
58 // Native Client sel_ldr (user untrusted code) sandbox. 58 // Native Client sel_ldr (user untrusted code) sandbox.
59 sandbox_process_type = sandbox::SANDBOX_TYPE_NACL_LOADER; 59 sandbox_process_type = sandbox::SANDBOX_TYPE_NACL_LOADER;
60 } else if ((process_type == switches::kPluginProcess) || 60 } else if ((process_type == switches::kPluginProcess) ||
61 (process_type == switches::kProfileImportProcess) || 61 (process_type == switches::kProfileImportProcess) ||
62 (process_type == switches::kGpuProcess)) { 62 (process_type == switches::kGpuProcess) ||
63 (process_type == switches::kServiceProcess)) {
63 return true; 64 return true;
64 } else { 65 } else {
65 // Failsafe: If you hit an unreached here, is your new process type in need 66 // Failsafe: If you hit an unreached here, is your new process type in need
66 // of sandboxing? 67 // of sandboxing?
67 NOTREACHED(); 68 NOTREACHED();
68 return true; 69 return true;
69 } 70 }
70 71
71 // Warm up APIs before turning on the sandbox. 72 // Warm up APIs before turning on the sandbox.
72 sandbox::SandboxWarmup(); 73 sandbox::SandboxWarmup();
73 74
74 // Actually sandbox the process. 75 // Actually sandbox the process.
75 return sandbox::EnableSandbox(sandbox_process_type, allowed_dir); 76 return sandbox::EnableSandbox(sandbox_process_type, allowed_dir);
76 } 77 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/service/cloud_print/cloud_print_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698