diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 18:32:37 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 18:32:37 +0000 |
commit | 610e1ef3195fe3b27e246fa39c8ac8d1a48460df (patch) | |
tree | cdedad60dbc7a2f9d7b6d5a78d80d08575bfac3c /chrome/app/breakpad_linux.cc | |
parent | ee052b86770a2d1d269502dd6c903276024e7826 (diff) | |
download | chromium_src-610e1ef3195fe3b27e246fa39c8ac8d1a48460df.zip chromium_src-610e1ef3195fe3b27e246fa39c8ac8d1a48460df.tar.gz chromium_src-610e1ef3195fe3b27e246fa39c8ac8d1a48460df.tar.bz2 |
Report the process type in Linux crash reports.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/147031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/breakpad_linux.cc')
-rw-r--r-- | chrome/app/breakpad_linux.cc | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc index 588118a..598ad28 100644 --- a/chrome/app/breakpad_linux.cc +++ b/chrome/app/breakpad_linux.cc @@ -39,6 +39,8 @@ static void write_uint64_hex(char* output, uint64_t v) { } pid_t UploadCrashDump(const char* filename, + const char* process_type, + unsigned process_type_length, const char* crash_url, unsigned crash_url_length, const char* guid, @@ -159,6 +161,7 @@ pid_t UploadCrashDump(const char* filename, static const char content_type_msg[] = "Content-Type: application/octet-stream"; static const char url_chunk_msg[] = "url-chunk-"; + static const char process_type_msg[] = "ptype"; struct kernel_iovec iov[29]; iov[0].iov_base = mime_boundary; @@ -231,6 +234,30 @@ pid_t UploadCrashDump(const char* filename, sys_writev(fd, iov, 29); + if (process_type_length) { + iov[0].iov_base = const_cast<char*>(form_data_msg); + iov[0].iov_len = sizeof(form_data_msg) - 1; + iov[1].iov_base = const_cast<char*>(process_type_msg); + iov[1].iov_len = sizeof(process_type_msg) - 1; + iov[2].iov_base = const_cast<char*>(quote_msg); + iov[2].iov_len = sizeof(quote_msg); + iov[3].iov_base = const_cast<char*>(rn); + iov[3].iov_len = sizeof(rn); + iov[4].iov_base = const_cast<char*>(rn); + iov[4].iov_len = sizeof(rn); + + iov[5].iov_base = const_cast<char*>(process_type); + iov[5].iov_len = process_type_length; + iov[6].iov_base = const_cast<char*>(rn); + iov[6].iov_len = sizeof(rn); + iov[7].iov_base = mime_boundary; + iov[7].iov_len = sizeof(mime_boundary) - 1; + iov[8].iov_base = const_cast<char*>(rn); + iov[8].iov_len = sizeof(rn); + + sys_writev(fd, iov, 9); + } + if (crash_url_length) { unsigned i = 0, done = 0; static const unsigned kMaxCrashChunkSize = 64; @@ -427,7 +454,7 @@ static bool CrashDone(const char* dump_path, memcpy(path + dump_path_len + 1 + minidump_id_len, ".dmp", 4); path[dump_path_len + 1 + minidump_id_len + 4] = 0; - UploadCrashDump(path, NULL, 0, google_update::linux_guid.data(), + UploadCrashDump(path, "browser", 7, NULL, 0, google_update::linux_guid.data(), google_update::linux_guid.length()); return true; |