diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-11 11:29:49 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-11 11:29:49 +0000 |
commit | 812befe3f00189ee161b5f412541dd0ba8840b79 (patch) | |
tree | a96f8ab57c5b81fef25e0c5af9aafa39e3d989fa /content | |
parent | 2c7a350921a14e0d6afb3cb24c7e36dbde141459 (diff) | |
download | chromium_src-812befe3f00189ee161b5f412541dd0ba8840b79.zip chromium_src-812befe3f00189ee161b5f412541dd0ba8840b79.tar.gz chromium_src-812befe3f00189ee161b5f412541dd0ba8840b79.tar.bz2 |
Refactor Mac crash key reporting - move to base/mac/crash_logging.{h,mm}
Breakpad support currently resides in chrome/app/breakpad_mac.* this makes it inaccessible to lower level code that would also like to set crash keys e.g. The sandboxing infrastructure.
This CL refactors the crash key reporting code to reside in base/mac.
Logging is also added to the Sandbox code to try to track down the cause of crbug.com/94758.
BUG=95272, 94758
TEST=On official builds crash logs should contain crash keys e.g. OS version.
Review URL: http://codereview.chromium.org/7849011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/sandbox_mac.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm index 5ee1bc5..d9e64d9 100644 --- a/content/common/sandbox_mac.mm +++ b/content/common/sandbox_mac.mm @@ -16,6 +16,7 @@ extern "C" { #include "base/basictypes.h" #include "base/command_line.h" #include "base/file_util.h" +#include "base/mac/crash_logging.h" #include "base/mac/mac_util.h" #include "base/rand_util_c.h" #include "base/mac/scoped_cftyperef.h" @@ -559,6 +560,10 @@ bool Sandbox::EnableSandbox(SandboxProcessType sandbox_type, void Sandbox::GetCanonicalSandboxPath(FilePath* path) { int fd = HANDLE_EINTR(open(path->value().c_str(), O_RDONLY)); if (fd < 0) { + base::mac::SetCrashKeyValue( + @"errno", [NSString stringWithFormat:@"%d", errno]); + base::mac::SetCrashKeyValue(@"homedir", NSHomeDirectory()); + PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " << path->value(); return; |