Add ICU message format support
[chromium-blink-merge.git] / sandbox / win / src / policy_params.h
blobe051d2b59d779c2b8f1aadfccea86ab4ea79a097
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
3 // found in the LICENSE file.
5 #ifndef SANDBOX_SRC_POLICY_PARAMS_H__
6 #define SANDBOX_SRC_POLICY_PARAMS_H__
8 #include "sandbox/win/src/policy_engine_params.h"
10 namespace sandbox {
12 class ParameterSet;
14 // Warning: The following macros store the address to the actual variables, in
15 // other words, the values are not copied.
16 #define POLPARAMS_BEGIN(type) class type { public: enum Args {
17 #define POLPARAM(arg) arg,
18 #define POLPARAMS_END(type) PolParamLast }; }; \
19 typedef sandbox::ParameterSet type##Array [type::PolParamLast];
21 // Policy parameters for file open / create.
22 POLPARAMS_BEGIN(OpenFile)
23 POLPARAM(NAME)
24 POLPARAM(BROKER) // TRUE if called from the broker.
25 POLPARAM(ACCESS)
26 POLPARAM(DISPOSITION)
27 POLPARAM(OPTIONS)
28 POLPARAMS_END(OpenFile)
30 // Policy parameter for name-based policies.
31 POLPARAMS_BEGIN(FileName)
32 POLPARAM(NAME)
33 POLPARAM(BROKER) // TRUE if called from the broker.
34 POLPARAMS_END(FileName)
36 static_assert(OpenFile::NAME == static_cast<int>(FileName::NAME),
37 "to simplify fs policies");
38 static_assert(OpenFile::BROKER == static_cast<int>(FileName::BROKER),
39 "to simplify fs policies");
41 // Policy parameter for name-based policies.
42 POLPARAMS_BEGIN(NameBased)
43 POLPARAM(NAME)
44 POLPARAMS_END(NameBased)
46 // Policy parameters for open event.
47 POLPARAMS_BEGIN(OpenEventParams)
48 POLPARAM(NAME)
49 POLPARAM(ACCESS)
50 POLPARAMS_END(OpenEventParams)
52 // Policy Parameters for reg open / create.
53 POLPARAMS_BEGIN(OpenKey)
54 POLPARAM(NAME)
55 POLPARAM(ACCESS)
56 POLPARAMS_END(OpenKey)
58 // Policy parameter for name-based policies.
59 POLPARAMS_BEGIN(HandleTarget)
60 POLPARAM(NAME)
61 POLPARAM(TARGET)
62 POLPARAMS_END(HandleTarget)
65 } // namespace sandbox
67 #endif // SANDBOX_SRC_POLICY_PARAMS_H__