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/win/src/broker_services.h" | 5 #include "sandbox/win/src/broker_services.h" |
6 | 6 |
7 #include <AclAPI.h> | 7 #include <AclAPI.h> |
8 #include <stddef.h> | |
9 | 8 |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
11 #include "base/macros.h" | 10 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
13 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
14 #include "base/threading/platform_thread.h" | 13 #include "base/threading/platform_thread.h" |
15 #include "base/win/scoped_handle.h" | 14 #include "base/win/scoped_handle.h" |
16 #include "base/win/scoped_process_information.h" | 15 #include "base/win/scoped_process_information.h" |
17 #include "base/win/startup_information.h" | 16 #include "base/win/startup_information.h" |
18 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
19 #include "sandbox/win/src/app_container.h" | 18 #include "sandbox/win/src/app_container.h" |
20 #include "sandbox/win/src/process_mitigations.h" | 19 #include "sandbox/win/src/process_mitigations.h" |
| 20 #include "sandbox/win/src/sandbox_policy_base.h" |
21 #include "sandbox/win/src/sandbox.h" | 21 #include "sandbox/win/src/sandbox.h" |
22 #include "sandbox/win/src/sandbox_policy_base.h" | |
23 #include "sandbox/win/src/target_process.h" | 22 #include "sandbox/win/src/target_process.h" |
24 #include "sandbox/win/src/win2k_threadpool.h" | 23 #include "sandbox/win/src/win2k_threadpool.h" |
25 #include "sandbox/win/src/win_utils.h" | 24 #include "sandbox/win/src/win_utils.h" |
26 | 25 |
27 namespace { | 26 namespace { |
28 | 27 |
29 // Utility function to associate a completion port to a job object. | 28 // Utility function to associate a completion port to a job object. |
30 bool AssociateCompletionPort(HANDLE job, HANDLE port, void* key) { | 29 bool AssociateCompletionPort(HANDLE job, HANDLE port, void* key) { |
31 JOBOBJECT_ASSOCIATE_COMPLETION_PORT job_acp = { key, port }; | 30 JOBOBJECT_ASSOCIATE_COMPLETION_PORT job_acp = { key, port }; |
32 return ::SetInformationJobObject(job, | 31 return ::SetInformationJobObject(job, |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 return SBOX_ERROR_UNSUPPORTED; | 540 return SBOX_ERROR_UNSUPPORTED; |
542 | 541 |
543 base::string16 name = LookupAppContainer(sid); | 542 base::string16 name = LookupAppContainer(sid); |
544 if (name.empty()) | 543 if (name.empty()) |
545 return SBOX_ERROR_INVALID_APP_CONTAINER; | 544 return SBOX_ERROR_INVALID_APP_CONTAINER; |
546 | 545 |
547 return DeleteAppContainer(sid); | 546 return DeleteAppContainer(sid); |
548 } | 547 } |
549 | 548 |
550 } // namespace sandbox | 549 } // namespace sandbox |
OLD | NEW |