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

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

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 5 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
« no previous file with comments | « sandbox/win/src/registry_interception.cc ('k') | sandbox/win/src/registry_policy.cc » ('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_REGISTRY_POLICY_H__ 5 #ifndef SANDBOX_SRC_REGISTRY_POLICY_H__
6 #define SANDBOX_SRC_REGISTRY_POLICY_H__ 6 #define SANDBOX_SRC_REGISTRY_POLICY_H__
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
12 #include "sandbox/win/src/crosscall_server.h" 13 #include "sandbox/win/src/crosscall_server.h"
13 #include "sandbox/win/src/nt_internals.h" 14 #include "sandbox/win/src/nt_internals.h"
14 #include "sandbox/win/src/policy_low_level.h" 15 #include "sandbox/win/src/policy_low_level.h"
15 #include "sandbox/win/src/sandbox_policy.h" 16 #include "sandbox/win/src/sandbox_policy.h"
16 17
17 namespace sandbox { 18 namespace sandbox {
18 19
19 enum EvalResult; 20 enum EvalResult;
20 21
21 // This class centralizes most of the knowledge related to registry policy 22 // This class centralizes most of the knowledge related to registry policy
22 class RegistryPolicy { 23 class RegistryPolicy {
23 public: 24 public:
24 // Creates the required low-level policy rules to evaluate a high-level 25 // Creates the required low-level policy rules to evaluate a high-level
25 // policy rule for registry IO, in particular open or create actions. 26 // policy rule for registry IO, in particular open or create actions.
26 static bool GenerateRules(const wchar_t* name, 27 static bool GenerateRules(const wchar_t* name,
27 TargetPolicy::Semantics semantics, 28 TargetPolicy::Semantics semantics,
28 LowLevelPolicy* policy); 29 LowLevelPolicy* policy);
29 30
30 // Performs the desired policy action on a create request with an 31 // Performs the desired policy action on a create request with an
31 // API that is compatible with the IPC-received parameters. 32 // API that is compatible with the IPC-received parameters.
32 static bool CreateKeyAction(EvalResult eval_result, 33 static bool CreateKeyAction(EvalResult eval_result,
33 const ClientInfo& client_info, 34 const ClientInfo& client_info,
34 const base::string16 &key, 35 const base::string16& key,
35 uint32 attributes, 36 uint32_t attributes,
36 HANDLE root_directory, 37 HANDLE root_directory,
37 uint32 desired_access, 38 uint32_t desired_access,
38 uint32 title_index, 39 uint32_t title_index,
39 uint32 create_options, 40 uint32_t create_options,
40 HANDLE* handle, 41 HANDLE* handle,
41 NTSTATUS* nt_status, 42 NTSTATUS* nt_status,
42 ULONG* disposition); 43 ULONG* disposition);
43 44
44 // Performs the desired policy action on an open request with an 45 // Performs the desired policy action on an open request with an
45 // API that is compatible with the IPC-received parameters. 46 // API that is compatible with the IPC-received parameters.
46 static bool OpenKeyAction(EvalResult eval_result, 47 static bool OpenKeyAction(EvalResult eval_result,
47 const ClientInfo& client_info, 48 const ClientInfo& client_info,
48 const base::string16 &key, 49 const base::string16& key,
49 uint32 attributes, 50 uint32_t attributes,
50 HANDLE root_directory, 51 HANDLE root_directory,
51 uint32 desired_access, 52 uint32_t desired_access,
52 HANDLE* handle, 53 HANDLE* handle,
53 NTSTATUS* nt_status); 54 NTSTATUS* nt_status);
54 }; 55 };
55 56
56 } // namespace sandbox 57 } // namespace sandbox
57 58
58 #endif // SANDBOX_SRC_REGISTRY_POLICY_H__ 59 #endif // SANDBOX_SRC_REGISTRY_POLICY_H__
OLDNEW
« no previous file with comments | « sandbox/win/src/registry_interception.cc ('k') | sandbox/win/src/registry_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698