OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #ifndef SANDBOX_SRC_PROCESS_THREAD_POLICY_H_ | 5 #ifndef SANDBOX_SRC_PROCESS_THREAD_POLICY_H_ |
6 #define SANDBOX_SRC_PROCESS_THREAD_POLICY_H_ | 6 #define SANDBOX_SRC_PROCESS_THREAD_POLICY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "sandbox/win/src/policy_low_level.h" | 12 #include "sandbox/win/src/policy_low_level.h" |
13 | 13 |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "sandbox/win/src/crosscall_server.h" | 15 #include "sandbox/win/src/crosscall_server.h" |
16 #include "sandbox/win/src/sandbox_policy.h" | 16 #include "sandbox/win/src/sandbox_policy.h" |
17 | 17 |
18 namespace sandbox { | 18 namespace sandbox { |
19 | 19 |
20 enum EvalResult; | |
21 | |
22 // This class centralizes most of the knowledge related to process execution. | 20 // This class centralizes most of the knowledge related to process execution. |
23 class ProcessPolicy { | 21 class ProcessPolicy { |
24 public: | 22 public: |
25 // Creates the required low-level policy rules to evaluate a high-level. | 23 // Creates the required low-level policy rules to evaluate a high-level. |
26 // policy rule for process creation | 24 // policy rule for process creation |
27 // 'name' is the executable to be spawn. | 25 // 'name' is the executable to be spawn. |
28 // 'semantics' is the desired semantics. | 26 // 'semantics' is the desired semantics. |
29 // 'policy' is the policy generator to which the rules are going to be added. | 27 // 'policy' is the policy generator to which the rules are going to be added. |
30 static bool GenerateRules(const wchar_t* name, | 28 static bool GenerateRules(const wchar_t* name, |
31 TargetPolicy::Semantics semantics, | 29 TargetPolicy::Semantics semantics, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 PVOID parameter, | 85 PVOID parameter, |
88 DWORD creation_flags, | 86 DWORD creation_flags, |
89 LPDWORD thread_id, | 87 LPDWORD thread_id, |
90 HANDLE* handle); | 88 HANDLE* handle); |
91 }; | 89 }; |
92 | 90 |
93 } // namespace sandbox | 91 } // namespace sandbox |
94 | 92 |
95 | 93 |
96 #endif // SANDBOX_SRC_PROCESS_THREAD_POLICY_H_ | 94 #endif // SANDBOX_SRC_PROCESS_THREAD_POLICY_H_ |
OLD | NEW |