| 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_TARGET_SERVICES_H__ | 5 #ifndef SANDBOX_SRC_TARGET_SERVICES_H__ |
| 6 #define SANDBOX_SRC_TARGET_SERVICES_H__ | 6 #define SANDBOX_SRC_TARGET_SERVICES_H__ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "sandbox/src/sandbox.h" | 9 #include "sandbox/src/sandbox.h" |
| 10 #include "sandbox/src/win_utils.h" | 10 #include "sandbox/src/win_utils.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Do NOT add a destructor to this class without changing the implementation of | 39 // Do NOT add a destructor to this class without changing the implementation of |
| 40 // the factory method. | 40 // the factory method. |
| 41 class TargetServicesBase : public TargetServices { | 41 class TargetServicesBase : public TargetServices { |
| 42 public: | 42 public: |
| 43 TargetServicesBase(); | 43 TargetServicesBase(); |
| 44 | 44 |
| 45 // Public interface of TargetServices. | 45 // Public interface of TargetServices. |
| 46 virtual ResultCode Init(); | 46 virtual ResultCode Init(); |
| 47 virtual void LowerToken(); | 47 virtual void LowerToken(); |
| 48 virtual ProcessState* GetState(); | 48 virtual ProcessState* GetState(); |
| 49 virtual ResultCode DuplicateHandle(HANDLE source_handle, |
| 50 DWORD target_process_id, |
| 51 HANDLE* target_handle, |
| 52 DWORD desired_access, |
| 53 BOOL inherit_handle, |
| 54 DWORD options); |
| 49 | 55 |
| 50 // Factory method. | 56 // Factory method. |
| 51 static TargetServicesBase* GetInstance(); | 57 static TargetServicesBase* GetInstance(); |
| 52 | 58 |
| 53 // Sends a simple IPC Message that has a well-known answer. Returns true | 59 // Sends a simple IPC Message that has a well-known answer. Returns true |
| 54 // if the IPC was successful and false otherwise. There are 2 versions of | 60 // if the IPC was successful and false otherwise. There are 2 versions of |
| 55 // this test: 1 and 2. The first one send a simple message while the | 61 // this test: 1 and 2. The first one send a simple message while the |
| 56 // second one send a message with an in/out param. | 62 // second one send a message with an in/out param. |
| 57 bool TestIPCPing(int version); | 63 bool TestIPCPing(int version); |
| 58 | 64 |
| 59 private: | 65 private: |
| 60 ProcessState process_state_; | 66 ProcessState process_state_; |
| 61 DISALLOW_COPY_AND_ASSIGN(TargetServicesBase); | 67 DISALLOW_COPY_AND_ASSIGN(TargetServicesBase); |
| 62 }; | 68 }; |
| 63 | 69 |
| 64 } // namespace sandbox | 70 } // namespace sandbox |
| 65 | 71 |
| 66 #endif // SANDBOX_SRC_TARGET_SERVICES_H__ | 72 #endif // SANDBOX_SRC_TARGET_SERVICES_H__ |
| OLD | NEW |