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

Unified Diff: sandbox/win/src/target_process.cc

Issue 1231673005: Sandbox: Update the constructor of TargetProcess to receive ScopedHandles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/target_process.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/target_process.cc
diff --git a/sandbox/win/src/target_process.cc b/sandbox/win/src/target_process.cc
index e0284c3924b27cd8f2419b7eda5ea3dd06471267..717fd9f8a473478175d65702f0b52c8909720660 100644
--- a/sandbox/win/src/target_process.cc
+++ b/sandbox/win/src/target_process.cc
@@ -65,13 +65,14 @@ void* GetBaseAddress(const wchar_t* exe_name, void* entry_point) {
}
-TargetProcess::TargetProcess(HANDLE initial_token, HANDLE lockdown_token,
+TargetProcess::TargetProcess(base::win::ScopedHandle initial_token,
+ base::win::ScopedHandle lockdown_token,
HANDLE job, ThreadProvider* thread_pool)
// This object owns everything initialized here except thread_pool and
// the job_ handle. The Job handle is closed by BrokerServices and results
// eventually in a call to our dtor.
- : lockdown_token_(lockdown_token),
- initial_token_(initial_token),
+ : lockdown_token_(lockdown_token.Pass()),
+ initial_token_(initial_token.Pass()),
job_(job),
thread_pool_(thread_pool),
base_address_(NULL) {
@@ -374,7 +375,9 @@ void TargetProcess::Terminate() {
}
TargetProcess* MakeTestTargetProcess(HANDLE process, HMODULE base_address) {
- TargetProcess* target = new TargetProcess(NULL, NULL, NULL, NULL);
+ TargetProcess* target = new TargetProcess(base::win::ScopedHandle(),
+ base::win::ScopedHandle(),
+ NULL, NULL);
PROCESS_INFORMATION process_info = {};
process_info.hProcess = process;
target->sandbox_process_info_.Set(process_info);
« no previous file with comments | « sandbox/win/src/target_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698