OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "sandbox/src/sandbox_policy_base.h" | 5 #include "sandbox/win/src/sandbox_policy_base.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "sandbox/src/filesystem_dispatcher.h" | 10 #include "sandbox/win/src/filesystem_dispatcher.h" |
11 #include "sandbox/src/filesystem_policy.h" | 11 #include "sandbox/win/src/filesystem_policy.h" |
12 #include "sandbox/src/handle_dispatcher.h" | 12 #include "sandbox/win/src/handle_dispatcher.h" |
13 #include "sandbox/src/handle_policy.h" | 13 #include "sandbox/win/src/handle_policy.h" |
14 #include "sandbox/src/job.h" | 14 #include "sandbox/win/src/job.h" |
15 #include "sandbox/src/interception.h" | 15 #include "sandbox/win/src/interception.h" |
16 #include "sandbox/src/named_pipe_dispatcher.h" | 16 #include "sandbox/win/src/named_pipe_dispatcher.h" |
17 #include "sandbox/src/named_pipe_policy.h" | 17 #include "sandbox/win/src/named_pipe_policy.h" |
18 #include "sandbox/src/policy_broker.h" | 18 #include "sandbox/win/src/policy_broker.h" |
19 #include "sandbox/src/policy_engine_processor.h" | 19 #include "sandbox/win/src/policy_engine_processor.h" |
20 #include "sandbox/src/policy_low_level.h" | 20 #include "sandbox/win/src/policy_low_level.h" |
21 #include "sandbox/src/process_thread_dispatcher.h" | 21 #include "sandbox/win/src/process_thread_dispatcher.h" |
22 #include "sandbox/src/process_thread_policy.h" | 22 #include "sandbox/win/src/process_thread_policy.h" |
23 #include "sandbox/src/registry_dispatcher.h" | 23 #include "sandbox/win/src/registry_dispatcher.h" |
24 #include "sandbox/src/registry_policy.h" | 24 #include "sandbox/win/src/registry_policy.h" |
25 #include "sandbox/src/restricted_token_utils.h" | 25 #include "sandbox/win/src/restricted_token_utils.h" |
26 #include "sandbox/src/sandbox_policy.h" | 26 #include "sandbox/win/src/sandbox_policy.h" |
27 #include "sandbox/src/sync_dispatcher.h" | 27 #include "sandbox/win/src/sync_dispatcher.h" |
28 #include "sandbox/src/sync_policy.h" | 28 #include "sandbox/win/src/sync_policy.h" |
29 #include "sandbox/src/target_process.h" | 29 #include "sandbox/win/src/target_process.h" |
30 #include "sandbox/src/window.h" | 30 #include "sandbox/win/src/window.h" |
31 | 31 |
32 namespace { | 32 namespace { |
33 // The standard windows size for one memory page. | 33 // The standard windows size for one memory page. |
34 const size_t kOneMemPage = 4096; | 34 const size_t kOneMemPage = 4096; |
35 // The IPC and Policy shared memory sizes. | 35 // The IPC and Policy shared memory sizes. |
36 const size_t kIPCMemSize = kOneMemPage * 2; | 36 const size_t kIPCMemSize = kOneMemPage * 2; |
37 const size_t kPolMemSize = kOneMemPage * 14; | 37 const size_t kPolMemSize = kOneMemPage * 14; |
38 | 38 |
39 // Helper function to allocate space (on the heap) for policy. | 39 // Helper function to allocate space (on the heap) for policy. |
40 sandbox::PolicyGlobal* MakeBrokerPolicyMemory() { | 40 sandbox::PolicyGlobal* MakeBrokerPolicyMemory() { |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 533 |
534 // Finally, setup imports on the target so the interceptions can work. | 534 // Finally, setup imports on the target so the interceptions can work. |
535 return SetupNtdllImports(target); | 535 return SetupNtdllImports(target); |
536 } | 536 } |
537 | 537 |
538 bool PolicyBase::SetupHandleCloser(TargetProcess* target) { | 538 bool PolicyBase::SetupHandleCloser(TargetProcess* target) { |
539 return handle_closer_.InitializeTargetHandles(target); | 539 return handle_closer_.InitializeTargetHandles(target); |
540 } | 540 } |
541 | 541 |
542 } // namespace sandbox | 542 } // namespace sandbox |
OLD | NEW |