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