diff options
Diffstat (limited to 'src/client/windows/crash_generation/crash_generation_client.h')
-rw-r--r-- | src/client/windows/crash_generation/crash_generation_client.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/windows/crash_generation/crash_generation_client.h b/src/client/windows/crash_generation/crash_generation_client.h index 85a0456c..2ce14dd2 100644 --- a/src/client/windows/crash_generation/crash_generation_client.h +++ b/src/client/windows/crash_generation/crash_generation_client.h @@ -66,6 +66,10 @@ class CrashGenerationClient { MINIDUMP_TYPE dump_type, const CustomClientInfo* custom_info); + CrashGenerationClient(HANDLE pipe_handle, + MINIDUMP_TYPE dump_type, + const CustomClientInfo* custom_info); + ~CrashGenerationClient(); // Registers the client process with the crash server. @@ -96,6 +100,14 @@ class CrashGenerationClient { // false will be returned. bool RequestDump(MDRawAssertionInfo* assert_info); + // If the crash generation client is running in a sandbox that prevents it + // from opening the named pipe directly, the server process may open the + // handle and duplicate it into the client process with this helper method. + // Returns INVALID_HANDLE_VALUE on failure. The process must have been opened + // with the PROCESS_DUP_HANDLE access right. + static HANDLE DuplicatePipeToClientProcess(const wchar_t* pipe_name, + HANDLE hProcess); + private: // Connects to the appropriate pipe and sets the pipe handle state. // @@ -127,6 +139,10 @@ class CrashGenerationClient { // Pipe name to use to talk to server. std::wstring pipe_name_; + // Pipe handle duplicated from server process. Only valid before + // Register is called. + HANDLE pipe_handle_; + // Custom client information CustomClientInfo custom_info_; |