| 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 size_t RegisterChromeCrashKeys() { | 
|  | 13   base::debug::CrashKey keys[] = { | 
|  | 14 #if defined(OS_MACOSX) | 
|  | 15     { mac::kFirstNSException, 1, kSingleChunkLength }, | 
|  | 16     { mac::kFirstNSExceptionTrace, 1, kSingleChunkLength }, | 
|  | 17     { mac::kLastNSException, 1, kSingleChunkLength }, | 
|  | 18     { mac::kLastNSExceptionTrace, 1, kSingleChunkLength }, | 
|  | 19     { mac::kNSException, 1, kSingleChunkLength }, | 
|  | 20     { mac::kSendAction, 1, kSingleChunkLength }, | 
|  | 21     { mac::kZombie, 1, kSingleChunkLength }, | 
|  | 22     { mac::kZombieTrace, 1, kSingleChunkLength }, | 
|  | 23     // content/: | 
|  | 24     { "channel_error_bt", 1, kSingleChunkLength }, | 
|  | 25     { "remove_route_bt", 1, kSingleChunkLength }, | 
|  | 26     { "rwhvm_window", 1, kSingleChunkLength }, | 
|  | 27     // media/: | 
|  | 28     { "VideoCaptureDeviceQTKit", 1, kSingleChunkLength }, | 
|  | 29 #endif | 
|  | 30   }; | 
|  | 31 | 
|  | 32   size_t num_keys; | 
|  | 33   base::debug::InitCrashKeys(keys, arraysize(keys), &num_keys); | 
|  | 34   return num_keys; | 
|  | 35 } | 
|  | 36 | 
|  | 37 // Crash Key Name Constants //////////////////////////////////////////////////// | 
|  | 38 | 
| 9 namespace mac { | 39 namespace mac { | 
| 10 | 40 | 
| 11 const char kFirstNSException[] = "firstexception"; | 41 const char kFirstNSException[] = "firstexception"; | 
| 12 const char kFirstNSExceptionTrace[] = "firstexception_bt"; | 42 const char kFirstNSExceptionTrace[] = "firstexception_bt"; | 
| 13 | 43 | 
| 14 const char kLastNSException[] = "lastexception"; | 44 const char kLastNSException[] = "lastexception"; | 
| 15 const char kLastNSExceptionTrace[] = "lastexception_bt"; | 45 const char kLastNSExceptionTrace[] = "lastexception_bt"; | 
| 16 | 46 | 
| 17 const char kNSException[] = "nsexception"; | 47 const char kNSException[] = "nsexception"; | 
| 18 | 48 | 
| 19 const char kSendAction[] = "sendaction"; | 49 const char kSendAction[] = "sendaction"; | 
| 20 | 50 | 
| 21 const char kZombie[] = "zombie"; | 51 const char kZombie[] = "zombie"; | 
| 22 const char kZombieTrace[] = "zombie_dealloc_bt"; | 52 const char kZombieTrace[] = "zombie_dealloc_bt"; | 
| 23 | 53 | 
| 24 }  // namespace mac | 54 }  // namespace mac | 
| 25 | 55 | 
| 26 }  // namespace crash_keys | 56 }  // namespace crash_keys | 
| OLD | NEW | 
|---|