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

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

Issue 382613002: Fixes for re-enabling more MSVC level 4 warnings: sandbox/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments + cleanup Created 6 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/process_policy_test.cc ('k') | sandbox/win/src/sync_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sync_dispatcher.cc
diff --git a/sandbox/win/src/sync_dispatcher.cc b/sandbox/win/src/sync_dispatcher.cc
index d4b36d5fc85000fc591f566229b25ad552d4222e..18a07439df91e7644de45b73d4235a5948eac6ea 100644
--- a/sandbox/win/src/sync_dispatcher.cc
+++ b/sandbox/win/src/sync_dispatcher.cc
@@ -35,12 +35,11 @@ SyncDispatcher::SyncDispatcher(PolicyBase* policy_base)
bool SyncDispatcher::SetupService(InterceptionManager* manager,
int service) {
- if (IPC_CREATEEVENT_TAG == service) {
+ if (service == IPC_CREATEEVENT_TAG) {
return INTERCEPT_NT(manager, NtCreateEvent, CREATE_EVENT_ID, 24);
- } else if (IPC_OPENEVENT_TAG == service) {
- return INTERCEPT_NT(manager, NtOpenEvent, OPEN_EVENT_ID, 16);
}
- return false;
+ return (service == IPC_OPENEVENT_TAG) &&
+ INTERCEPT_NT(manager, NtOpenEvent, OPEN_EVENT_ID, 16);
}
bool SyncDispatcher::CreateEvent(IPCInfo* ipc, base::string16* name,
@@ -52,11 +51,9 @@ bool SyncDispatcher::CreateEvent(IPCInfo* ipc, base::string16* name,
EvalResult result = policy_base_->EvalPolicy(IPC_CREATEEVENT_TAG,
params.GetBase());
HANDLE handle = NULL;
- DWORD ret = SyncPolicy::CreateEventAction(result, *ipc->client_info, *name,
- event_type, initial_state,
- &handle);
// Return operation status on the IPC.
- ipc->return_info.nt_status = ret;
+ ipc->return_info.nt_status = SyncPolicy::CreateEventAction(
+ result, *ipc->client_info, *name, event_type, initial_state, &handle);
ipc->return_info.handle = handle;
return true;
}
@@ -72,10 +69,9 @@ bool SyncDispatcher::OpenEvent(IPCInfo* ipc, base::string16* name,
EvalResult result = policy_base_->EvalPolicy(IPC_OPENEVENT_TAG,
params.GetBase());
HANDLE handle = NULL;
- DWORD ret = SyncPolicy::OpenEventAction(result, *ipc->client_info, *name,
- desired_access, &handle);
// Return operation status on the IPC.
- ipc->return_info.win32_result = ret;
+ ipc->return_info.nt_status = SyncPolicy::OpenEventAction(
+ result, *ipc->client_info, *name, desired_access, &handle);
ipc->return_info.handle = handle;
return true;
}
« no previous file with comments | « sandbox/win/src/process_policy_test.cc ('k') | sandbox/win/src/sync_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698