diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 08:55:22 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-26 08:55:22 +0000 |
commit | 6dde9d7f2a99851b0f84671832f072799dd3f8d5 (patch) | |
tree | 133dc5f7a37c0c1bf0e65f3ab32ef081a3c3f293 /base/linux_util.h | |
parent | 31de519d7a62e532c2bdded403a451c9f3f972da (diff) | |
download | chromium_src-6dde9d7f2a99851b0f84671832f072799dd3f8d5.zip chromium_src-6dde9d7f2a99851b0f84671832f072799dd3f8d5.tar.gz chromium_src-6dde9d7f2a99851b0f84671832f072799dd3f8d5.tar.bz2 |
Make crash reporting client_id accessible through child_process_logging.
On Mac and Linux, keep the client id in a global variable kept by the
child_process_logging implementations. This allows to read it in a
thread safe fashion when starting a child process.
Also replace std::string with statically allocated buffers for the
various items we add to the crash reports. This allows to properly
handle crashes upon shutdown (std::string would run its destructor,
invalidating the memory).
BUG=53231
TEST=Crash reporting should still work
Review URL: http://codereview.chromium.org/3186028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linux_util.h')
-rw-r--r-- | base/linux_util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/linux_util.h b/base/linux_util.h index 91cb113..0d2f20e 100644 --- a/base/linux_util.h +++ b/base/linux_util.h @@ -15,10 +15,17 @@ namespace base { static const char kFindInodeSwitch[] = "--find-inode"; +// This is declared here so the crash reporter can access the memory directly +// in compromised context without going through the standard library. +extern char g_linux_distro[]; + // Get the Linux Distro if we can, or return "Unknown", similar to // GetWinVersion() in base/win_util.h. std::string GetLinuxDistro(); +// Set the Linux Distro string. +void SetLinuxDistro(const std::string& distro); + // Return the inode number for the UNIX domain socket |fd|. bool FileDescriptorGetInode(ino_t* inode_out, int fd); |