aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/crash_generation/client_info.cc
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-13 22:20:30 +0000
committercdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-13 22:20:30 +0000
commit9a3de4160b4808b89c367126027533323690915e (patch)
tree96d42ce81be9754abd8d4a3cf3718ab36e7abc1c /src/client/windows/crash_generation/client_info.cc
parentFix file descriptor leaks in ExternalDumper test (diff)
downloadbreakpad-9a3de4160b4808b89c367126027533323690915e.tar.xz
Expose a callback to allow crash server implementations to defer the uploading of crash dumps to a later time. The client can provide a crash_id when the dump is performed and then at a later time connect again and request that the crash id be uploaded triggering an implementation defined callback.
BUG=473 TEST=CrashGenerationServerTest.* Review URL: https://breakpad.appspot.com/379001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@952 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/crash_generation/client_info.cc')
-rw-r--r--src/client/windows/crash_generation/client_info.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/windows/crash_generation/client_info.cc b/src/client/windows/crash_generation/client_info.cc
index 94f9c3cd..9c51cda3 100644
--- a/src/client/windows/crash_generation/client_info.cc
+++ b/src/client/windows/crash_generation/client_info.cc
@@ -52,7 +52,8 @@ ClientInfo::ClientInfo(CrashGenerationServer* crash_server,
dump_requested_handle_(NULL),
dump_generated_handle_(NULL),
dump_request_wait_handle_(NULL),
- process_exit_wait_handle_(NULL) {
+ process_exit_wait_handle_(NULL),
+ crash_id_(NULL) {
GetSystemTimeAsFileTime(&start_time_);
}
@@ -62,6 +63,12 @@ bool ClientInfo::Initialize() {
return false;
}
+ // The crash_id will be the low order word of the process creation time.
+ FILETIME creation_time, exit_time, kernel_time, user_time;
+ if (GetProcessTimes(process_handle_, &creation_time, &exit_time,
+ &kernel_time, &user_time))
+ crash_id_ = creation_time.dwLowDateTime;
+
dump_requested_handle_ = CreateEvent(NULL, // Security attributes.
TRUE, // Manual reset.
FALSE, // Initial state.