diff options
author | thestig@google.com <thestig@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-02 00:35:47 +0000 |
---|---|---|
committer | thestig@google.com <thestig@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-02 00:35:47 +0000 |
commit | 62e22cbfe72cf7d6784210516928ed445880b158 (patch) | |
tree | 8b36384f322dc337ef4b81d70f30de4f1bed7840 /chrome/browser/renderer_host | |
parent | 959a20f4111f323a2420ea7010e4fa2a8aaac21a (diff) | |
download | chromium_src-62e22cbfe72cf7d6784210516928ed445880b158.zip chromium_src-62e22cbfe72cf7d6784210516928ed445880b158.tar.gz chromium_src-62e22cbfe72cf7d6784210516928ed445880b158.tar.bz2 |
Generate GUIDs for users who wish to upload crash reports. Include it in crash reports.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/118096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r-- | chrome/browser/renderer_host/render_crash_handler_host_linux.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/renderer_host/render_crash_handler_host_linux.cc b/chrome/browser/renderer_host/render_crash_handler_host_linux.cc index a7342c5..87abf25 100644 --- a/chrome/browser/renderer_host/render_crash_handler_host_linux.cc +++ b/chrome/browser/renderer_host/render_crash_handler_host_linux.cc @@ -82,10 +82,11 @@ void RenderCrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) { static const unsigned kCrashContextSize = sizeof(google_breakpad::ExceptionHandler::CrashContext); static const unsigned kMaxActiveURLSize = 1024; + static const unsigned kGuidSize = 32; // 128 bits = 32 chars in hex. struct msghdr msg = {0}; struct iovec iov; - char context[kCrashContextSize + kMaxActiveURLSize]; + char context[kCrashContextSize + kMaxActiveURLSize + kGuidSize]; char control[kControlMsgSize]; iov.iov_base = context; iov.iov_len = sizeof(context); @@ -116,10 +117,12 @@ void RenderCrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) { return; } - // Anything in the message contents after the crash context is the crashing - // URL. - const char* const crash_url = &context[kCrashContextSize]; - const unsigned crash_url_len = n - kCrashContextSize; + // After the message contents we have the guid. + const char* const guid = &context[kCrashContextSize]; + + // Anything in the guid after the crash context is the crashing URL. + const char* const crash_url = &context[kCrashContextSize + kGuidSize]; + const unsigned crash_url_len = n - kCrashContextSize - kGuidSize; // Walk the control payload an extract the file descriptor and validated pid. pid_t crashing_pid = -1; @@ -179,7 +182,9 @@ void RenderCrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) { HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL)); HANDLE_EINTR(close(signal_fd)); - UploadCrashDump(minidump_filename.c_str(), crash_url, crash_url_len); + UploadCrashDump(minidump_filename.c_str(), + crash_url, crash_url_len, + guid, kGuidSize); } void RenderCrashHandlerHostLinux::WillDestroyCurrentMessageLoop() { |