Chromium Code Reviews| Index: sandbox/src/sandbox.h |
| =================================================================== |
| --- sandbox/src/sandbox.h (revision 128951) |
| +++ sandbox/src/sandbox.h (working copy) |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -84,6 +84,12 @@ |
| // If the return is ERROR_GENERIC, you can call ::GetLastError() to get |
| // more information. |
| virtual ResultCode WaitForAllTargets() = 0; |
| + |
| + // Checks if the supplied process ID matches one of the broker's active |
| + // target processes |
| + // Returns: |
| + // true if there is an active target process for this ID, otherwise false. |
| + virtual bool IsActiveTarget(DWORD process_id) = 0; |
|
rvargas (doing something else)
2012/03/27 00:35:33
In general, this interface is intended for the use
jschuh
2012/03/27 01:36:19
I exposed it because it seemed generally useful. F
|
| }; |
| // TargetServices models the current process from the perspective |
| @@ -126,6 +132,21 @@ |
| // information about the current state of the process, such as whether |
| // LowerToken has been called or not. |
| virtual ProcessState* GetState() = 0; |
| + |
| + // Requests the broker to duplicate the supplied handle into the target |
| + // process. The target process must be an active sandbox child process |
| + // and the source process must have a corresponding policy allowing |
| + // handle duplication for this object type. |
| + // Returns: |
| + // ALL_OK if successful. All other return values imply failure. |
| + // If the return is ERROR_GENERIC, you can call ::GetLastError() to get |
| + // more information. |
| + virtual ResultCode DuplicateHandle(HANDLE source_handle, |
| + DWORD target_process_id, |
| + HANDLE* target_handle, |
| + DWORD desired_access, |
| + BOOL inherit_handle, |
| + DWORD options) = 0; |
| }; |
| } // namespace sandbox |