| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROKER_SERVICES_H__ | 5 #ifndef SANDBOX_SRC_BROKER_SERVICES_H__ |
| 6 #define SANDBOX_SRC_BROKER_SERVICES_H__ | 6 #define SANDBOX_SRC_BROKER_SERVICES_H__ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "sandbox/src/crosscall_server.h" | 10 #include "sandbox/src/crosscall_server.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 ~BrokerServicesBase(); | 33 ~BrokerServicesBase(); |
| 34 | 34 |
| 35 // The next four methods are the BrokerServices interface | 35 // The next four methods are the BrokerServices interface |
| 36 virtual ResultCode Init(); | 36 virtual ResultCode Init(); |
| 37 | 37 |
| 38 virtual TargetPolicy* CreatePolicy(); | 38 virtual TargetPolicy* CreatePolicy(); |
| 39 | 39 |
| 40 virtual ResultCode SpawnTarget(const wchar_t* exe_path, | 40 virtual ResultCode SpawnTarget(const wchar_t* exe_path, |
| 41 const wchar_t* command_line, | 41 const wchar_t* command_line, |
| 42 TargetPolicy* policy, | 42 TargetPolicy* policy, |
| 43 PROCESS_INFORMATION* target); | 43 base::win::ScopedProcessInformation* target); |
| 44 | 44 |
| 45 virtual ResultCode WaitForAllTargets(); | 45 virtual ResultCode WaitForAllTargets(); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Helper structure that allows the Broker to associate a job notification | 48 // Helper structure that allows the Broker to associate a job notification |
| 49 // with a job object and with a policy. | 49 // with a job object and with a policy. |
| 50 struct JobTracker { | 50 struct JobTracker { |
| 51 HANDLE job; | 51 HANDLE job; |
| 52 PolicyBase* policy; | 52 PolicyBase* policy; |
| 53 JobTracker(HANDLE cjob, PolicyBase* cpolicy) | 53 JobTracker(HANDLE cjob, PolicyBase* cpolicy) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 typedef std::list<JobTracker*> JobTrackerList; | 85 typedef std::list<JobTracker*> JobTrackerList; |
| 86 JobTrackerList tracker_list_; | 86 JobTrackerList tracker_list_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase); | 88 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace sandbox | 91 } // namespace sandbox |
| 92 | 92 |
| 93 | 93 |
| 94 #endif // SANDBOX_SRC_BROKER_SERVICES_H__ | 94 #endif // SANDBOX_SRC_BROKER_SERVICES_H__ |
| OLD | NEW |