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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/handle_policy_test.cc ('k') | sandbox/win/src/target_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sync_policy_test.cc
diff --git a/sandbox/win/src/sync_policy_test.cc b/sandbox/win/src/sync_policy_test.cc
index ced5498f53a9edb41887392ecc4d8fe233cef54d..5368943c1cd2497d29f28b9d23a625f4ebe07733 100644
--- a/sandbox/win/src/sync_policy_test.cc
+++ b/sandbox/win/src/sync_policy_test.cc
@@ -25,7 +25,7 @@ SBOX_TESTS_COMMAND int Event_Open(int argc, wchar_t **argv) {
desired_access, FALSE, argv[1]));
DWORD error_open = ::GetLastError();
- if (event_open.Get())
+ if (event_open.IsValid())
return SBOX_TEST_SUCCEEDED;
if (ERROR_ACCESS_DENIED == error_open ||
@@ -57,7 +57,7 @@ SBOX_TESTS_COMMAND int Event_CreateOpen(int argc, wchar_t **argv) {
if (event_name)
event_open.Set(::OpenEvent(EVENT_ALL_ACCESS, FALSE, event_name));
- if (event_create.Get()) {
+ if (event_create.IsValid()) {
DWORD wait = ::WaitForSingleObject(event_create.Get(), 0);
if (initial_state && WAIT_OBJECT_0 != wait)
return SBOX_TEST_FAILED;
@@ -68,10 +68,11 @@ SBOX_TESTS_COMMAND int Event_CreateOpen(int argc, wchar_t **argv) {
if (event_name) {
// Both event_open and event_create have to be valid.
- if (event_open.Get() && event_create)
+ if (event_open.IsValid() && event_create.IsValid())
return SBOX_TEST_SUCCEEDED;
- if (event_open.Get() && !event_create || !event_open.Get() && event_create)
+ if (event_open.IsValid() && !event_create.IsValid() ||
+ !event_open.IsValid() && event_create.IsValid())
return SBOX_TEST_FAILED;
} else {
// Only event_create has to be valid.
« no previous file with comments | « sandbox/win/src/handle_policy_test.cc ('k') | sandbox/win/src/target_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698