| 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 #ifndef SANDBOX_WIN_SRC_BROKER_SERVICES_H_ | 5 #ifndef SANDBOX_WIN_SRC_BROKER_SERVICES_H_ |
| 6 #define SANDBOX_WIN_SRC_BROKER_SERVICES_H_ | 6 #define SANDBOX_WIN_SRC_BROKER_SERVICES_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const wchar_t* name) override; | 57 const wchar_t* name) override; |
| 58 ResultCode UninstallAppContainer(const wchar_t* sid) override; | 58 ResultCode UninstallAppContainer(const wchar_t* sid) override; |
| 59 | 59 |
| 60 // Checks if the supplied process ID matches one of the broker's active | 60 // Checks if the supplied process ID matches one of the broker's active |
| 61 // target processes | 61 // target processes |
| 62 // Returns: | 62 // Returns: |
| 63 // true if there is an active target process for this ID, otherwise false. | 63 // true if there is an active target process for this ID, otherwise false. |
| 64 bool IsActiveTarget(DWORD process_id); | 64 bool IsActiveTarget(DWORD process_id); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 struct TokenPair; | |
| 68 typedef std::list<JobTracker*> JobTrackerList; | 67 typedef std::list<JobTracker*> JobTrackerList; |
| 69 typedef std::map<DWORD, PeerTracker*> PeerTrackerMap; | 68 typedef std::map<DWORD, PeerTracker*> PeerTrackerMap; |
| 70 typedef std::map<uint32_t, TokenPair*> TokenCacheMap; | |
| 71 | 69 |
| 72 // The routine that the worker thread executes. It is in charge of | 70 // The routine that the worker thread executes. It is in charge of |
| 73 // notifications and cleanup-related tasks. | 71 // notifications and cleanup-related tasks. |
| 74 static DWORD WINAPI TargetEventsThread(PVOID param); | 72 static DWORD WINAPI TargetEventsThread(PVOID param); |
| 75 | 73 |
| 76 // Removes a target peer from the process list if it expires. | 74 // Removes a target peer from the process list if it expires. |
| 77 static VOID CALLBACK RemovePeer(PVOID parameter, BOOLEAN timeout); | 75 static VOID CALLBACK RemovePeer(PVOID parameter, BOOLEAN timeout); |
| 78 | 76 |
| 79 // The completion port used by the job objects to communicate events to | 77 // The completion port used by the job objects to communicate events to |
| 80 // the worker thread. | 78 // the worker thread. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 105 // job. Consult |jobless_process_handles_| for handles of pocess without job. | 103 // job. Consult |jobless_process_handles_| for handles of pocess without job. |
| 106 std::set<DWORD> child_process_ids_; | 104 std::set<DWORD> child_process_ids_; |
| 107 | 105 |
| 108 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase); | 106 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase); |
| 109 }; | 107 }; |
| 110 | 108 |
| 111 } // namespace sandbox | 109 } // namespace sandbox |
| 112 | 110 |
| 113 | 111 |
| 114 #endif // SANDBOX_WIN_SRC_BROKER_SERVICES_H_ | 112 #endif // SANDBOX_WIN_SRC_BROKER_SERVICES_H_ |
| OLD | NEW |