Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Side by Side Diff: sandbox/win/tests/common/controller.h

Issue 606443002: Remove implicit HANDLE conversions from sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/win/src/target_process.cc ('k') | sandbox/win/tests/common/controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TESTS_COMMON_CONTROLLER_H_ 5 #ifndef SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_
6 #define SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ 6 #define SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // destroyed. 112 // destroyed.
113 void SetKillOnDestruction(bool value) { kill_on_destruction_ = value; } 113 void SetKillOnDestruction(bool value) { kill_on_destruction_ = value; }
114 114
115 // Returns the pointers to the policy object. It can be used to modify 115 // Returns the pointers to the policy object. It can be used to modify
116 // the policy manually. 116 // the policy manually.
117 TargetPolicy* GetPolicy(); 117 TargetPolicy* GetPolicy();
118 118
119 BrokerServices* broker() { return broker_; } 119 BrokerServices* broker() { return broker_; }
120 120
121 // Returns the process handle for an asynchronous test. 121 // Returns the process handle for an asynchronous test.
122 HANDLE process() { return target_process_; } 122 HANDLE process() { return target_process_.Get(); }
123 123
124 // Returns the process ID for an asynchronous test. 124 // Returns the process ID for an asynchronous test.
125 DWORD process_id() { return target_process_id_; } 125 DWORD process_id() { return target_process_id_; }
126 126
127 private: 127 private:
128 // Initializes the data in the object. Sets is_init_ to tree if the 128 // Initializes the data in the object. Sets is_init_ to tree if the
129 // function succeeds. This is meant to be called from the constructor. 129 // function succeeds. This is meant to be called from the constructor.
130 void Init(JobLevel job_level, TokenLevel startup_token, 130 void Init(JobLevel job_level, TokenLevel startup_token,
131 TokenLevel main_token); 131 TokenLevel main_token);
132 132
(...skipping 17 matching lines...) Expand all
150 150
151 // Constructs a full path to a file inside the system32 (or syswow64) folder. 151 // Constructs a full path to a file inside the system32 (or syswow64) folder.
152 base::string16 MakePathToSys(const wchar_t* name, bool is_obj_man_path); 152 base::string16 MakePathToSys(const wchar_t* name, bool is_obj_man_path);
153 153
154 // Runs the given test on the target process. 154 // Runs the given test on the target process.
155 int DispatchCall(int argc, wchar_t **argv); 155 int DispatchCall(int argc, wchar_t **argv);
156 156
157 } // namespace sandbox 157 } // namespace sandbox
158 158
159 #endif // SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_ 159 #endif // SANDBOX_WIN_TESTS_COMMON_CONTROLLER_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/target_process.cc ('k') | sandbox/win/tests/common/controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698