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

Unified Diff: chrome/browser/renderer_host/render_crash_handler_host_linux.cc

Issue 118096: Generate GUIDs for users who wish to upload crash reports. Include it in cra... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « chrome/browser/google_update_settings_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_crash_handler_host_linux.cc
===================================================================
--- chrome/browser/renderer_host/render_crash_handler_host_linux.cc (revision 17371)
+++ chrome/browser/renderer_host/render_crash_handler_host_linux.cc (working copy)
@@ -82,10 +82,11 @@
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,11 +117,13 @@
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;
int signal_fd = -1;
@@ -179,7 +182,9 @@
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() {
« no previous file with comments | « chrome/browser/google_update_settings_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698