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

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

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

Powered by Google App Engine
This is Rietveld 408576698