| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/crash_keys.h" | 5 #include "chrome/common/crash_keys.h" |
| 6 | 6 |
| 7 namespace crash_keys { | 7 namespace crash_keys { |
| 8 | 8 |
| 9 // TODO(rsesek): This is true on Mac and Linux but not Windows. |
| 10 static const size_t kSingleChunkLength = 255; |
| 11 |
| 12 void RegisterChromeCrashKeys( |
| 13 base::debug::InitCrashKeysCallbackFuncT init_func) { |
| 14 base::debug::CrashKey keys[] = { |
| 15 #if defined(OS_MACOSX) |
| 16 { mac::kFirstNSException, 1, kSingleChunkLength }, |
| 17 { mac::kFirstNSExceptionTrace, 1, kSingleChunkLength }, |
| 18 { mac::kLastNSException, 1, kSingleChunkLength }, |
| 19 { mac::kLastNSExceptionTrace, 1, kSingleChunkLength }, |
| 20 { mac::kNSException, 1, kSingleChunkLength }, |
| 21 { mac::kSendAction, 1, kSingleChunkLength }, |
| 22 { mac::kZombie, 1, kSingleChunkLength }, |
| 23 { mac::kZombieTrace, 1, kSingleChunkLength }, |
| 24 // content/: |
| 25 { "channel_error_bt", 1, kSingleChunkLength }, |
| 26 { "remove_route_bt", 1, kSingleChunkLength }, |
| 27 { "rwhvm_window", 1, kSingleChunkLength }, |
| 28 // media/: |
| 29 { "VideoCaptureDeviceQTKit", 1, kSingleChunkLength }, |
| 30 #endif |
| 31 }; |
| 32 |
| 33 base::debug::InitCrashKeys(keys, arraysize(keys), init_func); |
| 34 } |
| 35 |
| 36 // Crash Key Name Constants //////////////////////////////////////////////////// |
| 37 |
| 9 namespace mac { | 38 namespace mac { |
| 10 | 39 |
| 11 const char kFirstNSException[] = "firstexception"; | 40 const char kFirstNSException[] = "firstexception"; |
| 12 const char kFirstNSExceptionTrace[] = "firstexception_bt"; | 41 const char kFirstNSExceptionTrace[] = "firstexception_bt"; |
| 13 | 42 |
| 14 const char kLastNSException[] = "lastexception"; | 43 const char kLastNSException[] = "lastexception"; |
| 15 const char kLastNSExceptionTrace[] = "lastexception_bt"; | 44 const char kLastNSExceptionTrace[] = "lastexception_bt"; |
| 16 | 45 |
| 17 const char kNSException[] = "nsexception"; | 46 const char kNSException[] = "nsexception"; |
| 18 | 47 |
| 19 const char kSendAction[] = "sendaction"; | 48 const char kSendAction[] = "sendaction"; |
| 20 | 49 |
| 21 const char kZombie[] = "zombie"; | 50 const char kZombie[] = "zombie"; |
| 22 const char kZombieTrace[] = "zombie_dealloc_bt"; | 51 const char kZombieTrace[] = "zombie_dealloc_bt"; |
| 23 | 52 |
| 24 } // namespace mac | 53 } // namespace mac |
| 25 | 54 |
| 26 } // namespace crash_keys | 55 } // namespace crash_keys |
| OLD | NEW |