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

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

Issue 41193002: Attempt3 at landing this. The previous attempt failed on Windows XP because the \Sessions\Session i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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/sync_dispatcher.h ('k') | sandbox/win/src/sync_interception.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
===================================================================
--- sandbox/win/src/sync_dispatcher.cc (revision 230780)
+++ sandbox/win/src/sync_dispatcher.cc (working copy)
@@ -25,7 +25,7 @@
};
static const IPCCall open_params = {
- {IPC_OPENEVENT_TAG, WCHAR_TYPE, ULONG_TYPE, ULONG_TYPE},
+ {IPC_OPENEVENT_TAG, WCHAR_TYPE, ULONG_TYPE},
reinterpret_cast<CallbackGeneric>(&SyncDispatcher::OpenEvent)
};
@@ -35,33 +35,16 @@
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,
- DWORD manual_reset, DWORD initial_state) {
+ DWORD event_type, DWORD initial_state) {
const wchar_t* event_name = name->c_str();
CountedParameterSet<NameBased> params;
params[NameBased::NAME] = ParamPickerMake(event_name);
@@ -70,16 +53,16 @@
params.GetBase());
HANDLE handle = NULL;
DWORD ret = SyncPolicy::CreateEventAction(result, *ipc->client_info, *name,
- manual_reset, initial_state,
+ event_type, initial_state,
&handle);
// Return operation status on the IPC.
- ipc->return_info.win32_result = ret;
+ ipc->return_info.nt_status = ret;
ipc->return_info.handle = handle;
return true;
}
bool SyncDispatcher::OpenEvent(IPCInfo* ipc, std::wstring* name,
- DWORD desired_access, DWORD inherit_handle) {
+ DWORD desired_access) {
const wchar_t* event_name = name->c_str();
CountedParameterSet<OpenEventParams> params;
@@ -90,8 +73,7 @@
params.GetBase());
HANDLE handle = NULL;
DWORD ret = SyncPolicy::OpenEventAction(result, *ipc->client_info, *name,
- desired_access, inherit_handle,
- &handle);
+ desired_access, &handle);
// Return operation status on the IPC.
ipc->return_info.win32_result = ret;
ipc->return_info.handle = handle;
« no previous file with comments | « sandbox/win/src/sync_dispatcher.h ('k') | sandbox/win/src/sync_interception.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698