| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_POLICY_LOW_LEVEL_H__ | 5 #ifndef SANDBOX_SRC_POLICY_LOW_LEVEL_H__ |
| 6 #define SANDBOX_SRC_POLICY_LOW_LEVEL_H__ | 6 #define SANDBOX_SRC_POLICY_LOW_LEVEL_H__ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // policyGen.AddRule(kNtCreateFileSvc, &rule2); | 34 // policyGen.AddRule(kNtCreateFileSvc, &rule2); |
| 35 // policyGen.Done(); | 35 // policyGen.Done(); |
| 36 // | 36 // |
| 37 // At this point (error checking omitted) the policy_memory can be copied | 37 // At this point (error checking omitted) the policy_memory can be copied |
| 38 // to the target process where it can be evaluated. | 38 // to the target process where it can be evaluated. |
| 39 | 39 |
| 40 namespace sandbox { | 40 namespace sandbox { |
| 41 | 41 |
| 42 // TODO(cpu): Move this constant to crosscall_client.h. | 42 // TODO(cpu): Move this constant to crosscall_client.h. |
| 43 const size_t kMaxServiceCount = 32; | 43 const size_t kMaxServiceCount = 32; |
| 44 COMPILE_ASSERT(IPC_LAST_TAG <= kMaxServiceCount, kMaxServiceCount_is_too_low); | 44 static_assert(IPC_LAST_TAG <= kMaxServiceCount, |
| 45 "kMaxServiceCount is too low"); |
| 45 | 46 |
| 46 // Defines the memory layout of the policy. This memory is filled by | 47 // Defines the memory layout of the policy. This memory is filled by |
| 47 // LowLevelPolicy object. | 48 // LowLevelPolicy object. |
| 48 // For example: | 49 // For example: |
| 49 // | 50 // |
| 50 // [Service 0] --points to---\ | 51 // [Service 0] --points to---\ |
| 51 // [Service 1] --------------|-----\ | 52 // [Service 1] --------------|-----\ |
| 52 // ...... | | | 53 // ...... | | |
| 53 // [Service N] | | | 54 // [Service N] | | |
| 54 // [data_size] | | | 55 // [data_size] | | |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 char* data_start, size_t* data_size) const; | 177 char* data_start, size_t* data_size) const; |
| 177 PolicyBuffer* buffer_; | 178 PolicyBuffer* buffer_; |
| 178 OpcodeFactory* opcode_factory_; | 179 OpcodeFactory* opcode_factory_; |
| 179 EvalResult action_; | 180 EvalResult action_; |
| 180 bool done_; | 181 bool done_; |
| 181 }; | 182 }; |
| 182 | 183 |
| 183 } // namespace sandbox | 184 } // namespace sandbox |
| 184 | 185 |
| 185 #endif // SANDBOX_SRC_POLICY_LOW_LEVEL_H__ | 186 #endif // SANDBOX_SRC_POLICY_LOW_LEVEL_H__ |
| OLD | NEW |