 Chromium Code Reviews
 Chromium Code Reviews Issue 11761030:
  Create the crash key registration system and register some Mac-specific keys.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 11761030:
  Create the crash key registration system and register some Mac-specific keys.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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; | |
| 
Scott Hess - ex-Googler
2013/01/10 18:43:54
My max_length comment was that if all of the max_l
 
Robert Sesek
2013/01/10 19:46:56
Ah, I like it. Done.
 
Scott Hess - ex-Googler
2013/01/10 20:16:28
Yeah.  I think it would be more justified if this
 | |
| 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 return base::debug::InitCrashKeys(keys, arraysize(keys)); | |
| 33 } | |
| 34 | |
| 35 // Crash Key Name Constants //////////////////////////////////////////////////// | |
| 36 | |
| 9 namespace mac { | 37 namespace mac { | 
| 10 | 38 | 
| 11 const char kFirstNSException[] = "firstexception"; | 39 const char kFirstNSException[] = "firstexception"; | 
| 12 const char kFirstNSExceptionTrace[] = "firstexception_bt"; | 40 const char kFirstNSExceptionTrace[] = "firstexception_bt"; | 
| 13 | 41 | 
| 14 const char kLastNSException[] = "lastexception"; | 42 const char kLastNSException[] = "lastexception"; | 
| 15 const char kLastNSExceptionTrace[] = "lastexception_bt"; | 43 const char kLastNSExceptionTrace[] = "lastexception_bt"; | 
| 16 | 44 | 
| 17 const char kNSException[] = "nsexception"; | 45 const char kNSException[] = "nsexception"; | 
| 18 | 46 | 
| 19 const char kSendAction[] = "sendaction"; | 47 const char kSendAction[] = "sendaction"; | 
| 20 | 48 | 
| 21 const char kZombie[] = "zombie"; | 49 const char kZombie[] = "zombie"; | 
| 22 const char kZombieTrace[] = "zombie_dealloc_bt"; | 50 const char kZombieTrace[] = "zombie_dealloc_bt"; | 
| 23 | 51 | 
| 24 } // namespace mac | 52 } // namespace mac | 
| 25 | 53 | 
| 26 } // namespace crash_keys | 54 } // namespace crash_keys | 
| OLD | NEW |