Index: sandbox/win/src/sync_dispatcher.cc |
=================================================================== |
--- sandbox/win/src/sync_dispatcher.cc (revision 229443) |
+++ sandbox/win/src/sync_dispatcher.cc (working copy) |
@@ -35,29 +35,12 @@ |
bool SyncDispatcher::SetupService(InterceptionManager* manager, |
int service) { |
- bool ret = false; |
- // We need to intercept kernelbase.dll on Windows 7 and beyond and |
- // kernel32.dll for earlier versions. |
- static const wchar_t* kWin32SyncDllName = |
- base::win::GetVersion() >= base::win::VERSION_WIN7 ? kKernelBasedllName : |
- kKerneldllName; |
- |
if (IPC_CREATEEVENT_TAG == service) { |
- ret = INTERCEPT_EAT(manager, kWin32SyncDllName, CreateEventW, |
- CREATE_EVENTW_ID, 20); |
- if (ret) { |
- ret = INTERCEPT_EAT(manager, kWin32SyncDllName, CreateEventA, |
- CREATE_EVENTA_ID, 20); |
- } |
+ return INTERCEPT_NT(manager, NtCreateEvent, CREATE_EVENT_ID, 24); |
} else if (IPC_OPENEVENT_TAG == service) { |
- ret = INTERCEPT_EAT(manager, kWin32SyncDllName, OpenEventW, OPEN_EVENTW_ID, |
- 16); |
- if (ret) { |
- ret = INTERCEPT_EAT(manager, kWin32SyncDllName, OpenEventA, |
- OPEN_EVENTA_ID, 16); |
- } |
+ return INTERCEPT_NT(manager, NtOpenEvent, OPEN_EVENT_ID, 16); |
} |
- return ret; |
+ return false; |
} |
bool SyncDispatcher::CreateEvent(IPCInfo* ipc, std::wstring* name, |