aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/crash_generation/crash_generation_client.h
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-07-16 15:16:01 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-07-16 15:16:01 +0000
commit534189b735cdf75d017af859fec92f2e671541e0 (patch)
tree43c30c6f44da10c1bd69c05f2a3939f7356c5370 /src/client/windows/crash_generation/crash_generation_client.h
parentAdd the capability to include an arbitrary data stream within minidumps (diff)
downloadbreakpad-534189b735cdf75d017af859fec92f2e671541e0.tar.xz
Allow the crash generation server to be initialized with a handle instead of a pipe name
A=bsmedberg R=ted at http://breakpad.appspot.com/406002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@985 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/crash_generation/crash_generation_client.h')
-rw-r--r--src/client/windows/crash_generation/crash_generation_client.h16
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_;