Chromium Code Reviews| 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 // TODO(rsesek): Remove when done testing. Needed so arraysize > 0. | |
|
Mark Mentovai
2013/01/15 21:31:03
If the arraysize > 0 bit is really important, put
Robert Sesek
2013/01/15 21:40:50
This is get around a compiler error from ArraySize
| |
| 15 { "rsesek_key", 1 }, | |
| 16 #if defined(OS_MACOSX) | |
| 17 { mac::kFirstNSException, 1 }, | |
| 18 { mac::kFirstNSExceptionTrace, 1 }, | |
| 19 { mac::kLastNSException, 1 }, | |
| 20 { mac::kLastNSExceptionTrace, 1 }, | |
| 21 { mac::kNSException, 1 }, | |
| 22 { mac::kSendAction, 1 }, | |
| 23 { mac::kZombie, 1 }, | |
| 24 { mac::kZombieTrace, 1 }, | |
| 25 // content/: | |
| 26 { "channel_error_bt", 1 }, | |
| 27 { "remove_route_bt", 1 }, | |
| 28 { "rwhvm_window", 1 }, | |
| 29 // media/: | |
| 30 { "VideoCaptureDeviceQTKit", 1 }, | |
| 31 #endif | |
| 32 }; | |
| 33 | |
| 34 return base::debug::InitCrashKeys(keys, arraysize(keys), kSingleChunkLength); | |
| 35 } | |
| 36 | |
| 37 // Crash Key Name Constants //////////////////////////////////////////////////// | |
|
brettw
2013/01/15 21:19:17
I wouldn't do this comment since the file is small
Robert Sesek
2013/01/15 21:40:50
Done.
| |
| 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 |