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

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

Issue 92173002: Merge 237541 "Revert of https://codereview.chromium.org/71013004/" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1721/src/
Patch Set: Created 7 years, 1 month 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/job_unittest.cc ('k') | sandbox/win/src/process_policy_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/policy_target_test.cc
===================================================================
--- sandbox/win/src/policy_target_test.cc (revision 237598)
+++ sandbox/win/src/policy_target_test.cc (working copy)
@@ -150,11 +150,10 @@
// Use default values to create a new process.
STARTUPINFO startup_info = {0};
startup_info.cb = sizeof(startup_info);
- PROCESS_INFORMATION temp_process_info = {};
+ base::win::ScopedProcessInformation process_info;
if (!::CreateProcessW(L"foo.exe", L"foo.exe", NULL, NULL, FALSE, 0,
- NULL, NULL, &startup_info, &temp_process_info))
+ NULL, NULL, &startup_info, process_info.Receive()))
return SBOX_TEST_SUCCEEDED;
- base::win::ScopedProcessInformation process_info(temp_process_info);
return SBOX_TEST_FAILED;
}
@@ -240,14 +239,11 @@
TargetPolicy* policy = broker->CreatePolicy();
policy->SetAlternateDesktop(false);
policy->SetTokenLevel(USER_INTERACTIVE, USER_LOCKDOWN);
- PROCESS_INFORMATION temp_process_info = {};
result = broker->SpawnTarget(prog_name, arguments.c_str(), policy,
- &temp_process_info);
+ target.Receive());
policy->Release();
EXPECT_EQ(SBOX_ALL_OK, result);
- if (result == SBOX_ALL_OK)
- target.Set(temp_process_info);
EXPECT_EQ(1, ::ResumeThread(target.thread_handle()));
@@ -303,14 +299,11 @@
TargetPolicy* policy = broker->CreatePolicy();
policy->SetAlternateDesktop(true);
policy->SetTokenLevel(USER_INTERACTIVE, USER_LOCKDOWN);
- PROCESS_INFORMATION temp_process_info = {};
result = broker->SpawnTarget(prog_name, arguments.c_str(), policy,
- &temp_process_info);
+ target.Receive());
policy->Release();
EXPECT_EQ(SBOX_ALL_OK, result);
- if (result == SBOX_ALL_OK)
- target.Set(temp_process_info);
EXPECT_EQ(1, ::ResumeThread(target.thread_handle()));
« no previous file with comments | « sandbox/win/src/job_unittest.cc ('k') | sandbox/win/src/process_policy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698