summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:44:35 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:44:35 +0000
commit0be8dd6707c9f02a089bf46c1fbfaa0131b42dc1 (patch)
treeeada339e144bbd9db2117b44efe342b6eabc2926
parente50285848200ab593c6332e9e95d41abe91be5a9 (diff)
downloadchromium_src-0be8dd6707c9f02a089bf46c1fbfaa0131b42dc1.zip
chromium_src-0be8dd6707c9f02a089bf46c1fbfaa0131b42dc1.tar.gz
chromium_src-0be8dd6707c9f02a089bf46c1fbfaa0131b42dc1.tar.bz2
Set Mac crash dumps to go in chrome::DIR_CRASH_DUMPS
This makes it consistent across other platforms, such that chrome::DIR_CRASH_DUMPS on Mac actually points to the right dir. Crash dumps used to go in ~/Library/Breakpad/Chrome_Mac They'll now go in: ~/Library/Application Support/Google/Chrome/Crash Reports BUG=52365 TEST=Mac breakpad continues to work Review URL: http://codereview.chromium.org/3152021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56415 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/breakpad_mac.mm19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index f96327c..283a56d 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -14,11 +14,13 @@
#include "base/file_util.h"
#import "base/logging.h"
#include "base/mac_util.h"
+#include "base/path_service.h"
#include "base/scoped_cftyperef.h"
#import "base/scoped_nsautorelease_pool.h"
#include "base/sys_string_conversions.h"
#import "breakpad/src/client/mac/Framework/Breakpad.h"
#include "chrome/common/child_process_logging.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/policy_constants.h"
#include "chrome/installer/util/google_update_settings.h"
@@ -117,15 +119,9 @@ void InitCrashReporter() {
LOG(ERROR) << "Directory " << alternate_minidump_location <<
" doesn't exist";
} else {
- NSFileManager* file_manager = [NSFileManager defaultManager];
- size_t minidump_location_len = strlen(alternate_minidump_location);
- DCHECK(minidump_location_len > 0);
- NSString* minidump_location = [file_manager
- stringWithFileSystemRepresentation:alternate_minidump_location
- length:minidump_location_len];
- [breakpad_config
- setObject:minidump_location
- forKey:@BREAKPAD_DUMP_DIRECTORY];
+ PathService::Override(
+ chrome::DIR_CRASH_DUMPS,
+ FilePath(alternate_minidump_location));
if (is_browser) {
// Print out confirmation message to the stdout, but only print
// from browser process so we don't flood the terminal.
@@ -135,6 +131,11 @@ void InitCrashReporter() {
}
}
+ FilePath dir_crash_dumps;
+ PathService::Get(chrome::DIR_CRASH_DUMPS, &dir_crash_dumps);
+ [breakpad_config setObject:base::SysUTF8ToNSString(dir_crash_dumps.value())
+ forKey:@BREAKPAD_DUMP_DIRECTORY];
+
// Initialize Breakpad.
gBreakpadRef = BreakpadCreate(breakpad_config);
if (!gBreakpadRef) {