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

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

Issue 1328001: Added command buffer implementation of WebGL which runs in the sandbox.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
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 23 matching lines...) Expand all
34 } else if (process_type == switches::kUtilityProcess) { 34 } else if (process_type == switches::kUtilityProcess) {
35 // Utility process sandbox. 35 // Utility process sandbox.
36 sandbox_process_type = sandbox::SANDBOX_TYPE_UTILITY; 36 sandbox_process_type = sandbox::SANDBOX_TYPE_UTILITY;
37 allowed_dir = FilePath::FromWStringHack( 37 allowed_dir = FilePath::FromWStringHack(
38 command_line.GetSwitchValue(switches::kUtilityProcessAllowedDir)); 38 command_line.GetSwitchValue(switches::kUtilityProcessAllowedDir));
39 } else if (process_type == switches::kWorkerProcess) { 39 } else if (process_type == switches::kWorkerProcess) {
40 // Worker process sandbox. 40 // Worker process sandbox.
41 sandbox_process_type = sandbox::SANDBOX_TYPE_WORKER; 41 sandbox_process_type = sandbox::SANDBOX_TYPE_WORKER;
42 } else if ((process_type == switches::kNaClLoaderProcess) || 42 } else if ((process_type == switches::kNaClLoaderProcess) ||
43 (process_type == switches::kPluginProcess) || 43 (process_type == switches::kPluginProcess) ||
44 (process_type == switches::kProfileImportProcess)) { 44 (process_type == switches::kProfileImportProcess) ||
45 (process_type == switches::kGpuProcess)) {
45 return true; 46 return true;
46 } else { 47 } else {
47 // Failsafe: If you hit an unreached here, is your new process type in need 48 // Failsafe: If you hit an unreached here, is your new process type in need
48 // of sandboxing? 49 // of sandboxing?
49 NOTREACHED(); 50 NOTREACHED();
50 return true; 51 return true;
51 } 52 }
52 53
53 // Warm up APIs before turning on the sandbox. 54 // Warm up APIs before turning on the sandbox.
54 sandbox::SandboxWarmup(); 55 sandbox::SandboxWarmup();
55 56
56 // Actually sandbox the process. 57 // Actually sandbox the process.
57 return sandbox::EnableSandbox(sandbox_process_type, allowed_dir); 58 return sandbox::EnableSandbox(sandbox_process_type, allowed_dir);
58 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698