| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BASE_MAC_CRASH_LOGGING_H_ |
| 6 #define BASE_MAC_CRASH_LOGGING_H_ |
| 7 |
| 8 #if __OBJC__ |
| 9 #import "base/memory/scoped_nsobject.h" |
| 10 |
| 11 @class NSString; |
| 12 #else |
| 13 class NSString; |
| 14 #endif |
| 15 |
| 16 namespace base { |
| 17 namespace mac { |
| 18 |
| 19 typedef void (*SetCrashKeyValueFuncPtr)(NSString*, NSString*); |
| 20 typedef void (*ClearCrashKeyValueFuncPtr)(NSString*); |
| 21 |
| 22 // Set the low level functions used to supply crash keys to Breakpad. |
| 23 void SetCrashKeyFunctions(SetCrashKeyValueFuncPtr set_key_func, |
| 24 ClearCrashKeyValueFuncPtr clear_key_func); |
| 25 |
| 26 // Set and clear meta information for Minidump. |
| 27 // IMPORTANT: On OS X, the key/value pairs are sent to the crash server |
| 28 // out of bounds and not recorded on disk in the minidump, this means |
| 29 // that if you look at the minidump file locally you won't see them! |
| 30 void SetCrashKeyValue(NSString* key, NSString* val); |
| 31 void ClearCrashKey(NSString* key); |
| 32 |
| 33 #if __OBJC__ |
| 34 |
| 35 class ScopedCrashKey { |
| 36 public: |
| 37 ScopedCrashKey(NSString* key, NSString* value); |
| 38 ~ScopedCrashKey(); |
| 39 private: |
| 40 scoped_nsobject<NSString> crash_key_; |
| 41 DISALLOW_COPY_AND_ASSIGN(ScopedCrashKey); |
| 42 }; |
| 43 |
| 44 #endif // __OBJC__ |
| 45 |
| 46 } // namespace mac |
| 47 } // namespace base |
| 48 |
| 49 #endif // BASE_MAC_CRASH_LOGGING_H_ |
| OLD | NEW |