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

Side by Side Diff: base/mac/crash_logging.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gypi ('k') | base/mac/crash_logging.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/mac/crash_logging.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698