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

Unified Diff: chrome/app/breakpad_mac.mm

Issue 7849011: Refactor Mac crash key reporting - move to base/mac/crash_logging.{h,mm} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comments Created 9 years, 3 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/app/breakpad_mac.h ('k') | chrome/app/breakpad_mac_stubs.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/breakpad_mac.mm
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index 840ac470139ab6faa9a7f66289ed46ffba0d3a27..eb69d369f72f6e097396562de581a0ecd02715c2 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -30,6 +30,26 @@ namespace {
BreakpadRef gBreakpadRef = NULL;
+void SetCrashKeyValue(NSString* key, NSString* value) {
+ // Comment repeated from header to prevent confusion:
+ // IMPORTANT: On OS X, the key/value pairs are sent to the crash server
+ // out of bounds and not recorded on disk in the minidump, this means
+ // that if you look at the minidump file locally you won't see them!
+ if (gBreakpadRef == NULL) {
+ return;
+ }
+
+ BreakpadAddUploadParameter(gBreakpadRef, key, value);
+}
+
+void ClearCrashKeyValue(NSString* key) {
+ if (gBreakpadRef == NULL) {
+ return;
+ }
+
+ BreakpadRemoveUploadParameter(gBreakpadRef, key);
+}
+
} // namespace
bool IsCrashReporterEnabled() {
@@ -155,8 +175,8 @@ void InitCrashReporter() {
// Enable child process crashes to include the page URL.
// TODO: Should this only be done for certain process types?
- child_process_logging::SetCrashKeyFunctions(SetCrashKeyValue,
- ClearCrashKeyValue);
+ base::mac::SetCrashKeyFunctions(SetCrashKeyValue,
+ ClearCrashKeyValue);
if (!is_browser) {
// Get the guid from the command line switch.
@@ -183,33 +203,3 @@ void InitCrashProcessInfo() {
// Store process type in crash dump.
SetCrashKeyValue(@"ptype", process_type);
}
-
-void SetCrashKeyValue(NSString* key, NSString* value) {
- // Comment repeated from header to prevent confusion:
- // IMPORTANT: On OS X, the key/value pairs are sent to the crash server
- // out of bounds and not recorded on disk in the minidump, this means
- // that if you look at the minidump file locally you won't see them!
- if (gBreakpadRef == NULL) {
- return;
- }
-
- BreakpadAddUploadParameter(gBreakpadRef, key, value);
-}
-
-void ClearCrashKeyValue(NSString* key) {
- if (gBreakpadRef == NULL) {
- return;
- }
-
- BreakpadRemoveUploadParameter(gBreakpadRef, key);
-}
-
-// NOTE(shess): These also exist in breakpad_mac_stubs.mm.
-ScopedCrashKey::ScopedCrashKey(NSString* key, NSString* value)
- : crash_key_([key retain]) {
- SetCrashKeyValue(crash_key_.get(), value);
-}
-
-ScopedCrashKey::~ScopedCrashKey() {
- ClearCrashKeyValue(crash_key_.get());
-}
« no previous file with comments | « chrome/app/breakpad_mac.h ('k') | chrome/app/breakpad_mac_stubs.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698