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

Side by Side Diff: sandbox/win/src/policy_low_level.h

Issue 821693003: replace COMPILE_ASSERT with static_assert in sandbox/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 11 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
« no previous file with comments | « sandbox/win/src/policy_engine_opcodes.h ('k') | sandbox/win/src/policy_params.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) 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
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
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__
OLDNEW
« no previous file with comments | « sandbox/win/src/policy_engine_opcodes.h ('k') | sandbox/win/src/policy_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698