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

Side by Side Diff: chrome/common/sandbox_init_wrapper.h

Issue 5491001: Mac: Sandbox GPU process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make tests work for now Created 10 years 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 #ifndef CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_ 5 #ifndef CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
6 #define CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_ 6 #define CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
7 #pragma once 7 #pragma once
8 8
9 // Wraps the sandbox initialization and platform variables to consolodate 9 // Wraps the sandbox initialization and platform variables to consolodate
10 // the code and reduce the number of platform ifdefs elsewhere. The POSIX 10 // the code and reduce the number of platform ifdefs elsewhere. The POSIX
(...skipping 14 matching lines...) Expand all
25 25
26 class SandboxInitWrapper { 26 class SandboxInitWrapper {
27 public: 27 public:
28 SandboxInitWrapper() : broker_services_(), target_services_() { } 28 SandboxInitWrapper() : broker_services_(), target_services_() { }
29 // SetServices() needs to be called before InitializeSandbox() on Win32 with 29 // SetServices() needs to be called before InitializeSandbox() on Win32 with
30 // the info received from the chrome exe main. 30 // the info received from the chrome exe main.
31 void SetServices(sandbox::SandboxInterfaceInfo* sandbox_info); 31 void SetServices(sandbox::SandboxInterfaceInfo* sandbox_info);
32 sandbox::BrokerServices* BrokerServices() const { return broker_services_; } 32 sandbox::BrokerServices* BrokerServices() const { return broker_services_; }
33 sandbox::TargetServices* TargetServices() const { return target_services_; } 33 sandbox::TargetServices* TargetServices() const { return target_services_; }
34 34
35 // Initialize the sandbox for renderer and plug-in processes, depending on 35 // Initialize the sandbox for renderer, gpu, utility, worker, nacl, and
36 // the command line flags. The browser process is not sandboxed. 36 // plug-in processes, depending on the command line flags. The browser
37 // process is not sandboxed.
37 // Returns true if the sandbox was initialized succesfully, false if an error 38 // Returns true if the sandbox was initialized succesfully, false if an error
38 // occurred. If process_type isn't one that needs sandboxing true is always 39 // occurred. If process_type isn't one that needs sandboxing true is always
39 // returned. 40 // returned.
40 bool InitializeSandbox(const CommandLine& parsed_command_line, 41 bool InitializeSandbox(const CommandLine& parsed_command_line,
41 const std::string& process_type); 42 const std::string& process_type);
42 private: 43 private:
43 sandbox::BrokerServices* broker_services_; 44 sandbox::BrokerServices* broker_services_;
44 sandbox::TargetServices* target_services_; 45 sandbox::TargetServices* target_services_;
45 46
46 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper); 47 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper);
(...skipping 13 matching lines...) Expand all
60 bool InitializeSandbox(const CommandLine& parsed_command_line, 61 bool InitializeSandbox(const CommandLine& parsed_command_line,
61 const std::string& process_type); 62 const std::string& process_type);
62 63
63 private: 64 private:
64 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper); 65 DISALLOW_COPY_AND_ASSIGN(SandboxInitWrapper);
65 }; 66 };
66 67
67 #endif 68 #endif
68 69
69 #endif // CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_ 70 #endif // CHROME_COMMON_SANDBOX_INIT_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698