| 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 #if defined(OS_MACOSX) | 7 #if defined(OS_MACOSX) |
| 8 #include "breakpad/src/common/simple_string_dictionary.h" | 8 #include "breakpad/src/common/simple_string_dictionary.h" |
| 9 #elif defined(OS_WIN) | 9 #elif defined(OS_WIN) |
| 10 #include "breakpad/src/client/windows/common/ipc_protocol.h" | 10 #include "breakpad/src/client/windows/common/ipc_protocol.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 COMPILE_ASSERT(kSmallSize <= kSingleChunkLength, | 39 COMPILE_ASSERT(kSmallSize <= kSingleChunkLength, |
| 40 crash_key_chunk_size_too_small); | 40 crash_key_chunk_size_too_small); |
| 41 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
| 42 COMPILE_ASSERT(kMediumSize <= kSingleChunkLength, | 42 COMPILE_ASSERT(kMediumSize <= kSingleChunkLength, |
| 43 mac_has_medium_size_crash_key_chunks); | 43 mac_has_medium_size_crash_key_chunks); |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 size_t RegisterChromeCrashKeys() { | 46 size_t RegisterChromeCrashKeys() { |
| 47 base::debug::CrashKey keys[] = { | 47 base::debug::CrashKey keys[] = { |
| 48 { kActiveURL, kLargeSize }, | 48 { kActiveURL, kLargeSize }, |
| 49 { kGPUVendorID, kSmallSize }, |
| 50 { kGPUDeviceID, kSmallSize }, |
| 51 { kGPUDriverVersion, kSmallSize }, |
| 52 { kGPUPixelShaderVersion, kSmallSize }, |
| 53 { kGPUVertexShaderVersion, kSmallSize }, |
| 54 { kGPUVendor, kSmallSize }, |
| 55 { kGPURenderer, kSmallSize }, |
| 56 { kGPUGLVersion, kSmallSize }, |
| 49 | 57 |
| 50 // content/: | 58 // content/: |
| 51 { "ppapi_path", kMediumSize }, | 59 { "ppapi_path", kMediumSize }, |
| 52 { "subresource_url", kLargeSize }, | 60 { "subresource_url", kLargeSize }, |
| 53 #if defined(OS_MACOSX) | 61 #if defined(OS_MACOSX) |
| 54 { mac::kFirstNSException, kMediumSize }, | 62 { mac::kFirstNSException, kMediumSize }, |
| 55 { mac::kFirstNSExceptionTrace, kMediumSize }, | 63 { mac::kFirstNSExceptionTrace, kMediumSize }, |
| 56 { mac::kLastNSException, kMediumSize }, | 64 { mac::kLastNSException, kMediumSize }, |
| 57 { mac::kLastNSExceptionTrace, kMediumSize }, | 65 { mac::kLastNSExceptionTrace, kMediumSize }, |
| 58 { mac::kNSException, kMediumSize }, | 66 { mac::kNSException, kMediumSize }, |
| 59 { mac::kNSExceptionTrace, kMediumSize }, | 67 { mac::kNSExceptionTrace, kMediumSize }, |
| 60 { mac::kSendAction, kMediumSize }, | 68 { mac::kSendAction, kMediumSize }, |
| 61 { mac::kZombie, kMediumSize }, | 69 { mac::kZombie, kMediumSize }, |
| 62 { mac::kZombieTrace, kMediumSize }, | 70 { mac::kZombieTrace, kMediumSize }, |
| 63 // content/: | 71 // content/: |
| 64 { "channel_error_bt", kMediumSize }, | 72 { "channel_error_bt", kMediumSize }, |
| 65 { "remove_route_bt", kMediumSize }, | 73 { "remove_route_bt", kMediumSize }, |
| 66 { "rwhvm_window", kMediumSize }, | 74 { "rwhvm_window", kMediumSize }, |
| 67 // media/: | 75 // media/: |
| 68 { "VideoCaptureDeviceQTKit", kSmallSize }, | 76 { "VideoCaptureDeviceQTKit", kSmallSize }, |
| 69 #endif | 77 #endif |
| 70 }; | 78 }; |
| 71 | 79 |
| 72 return base::debug::InitCrashKeys(keys, arraysize(keys), kSingleChunkLength); | 80 return base::debug::InitCrashKeys(keys, arraysize(keys), kSingleChunkLength); |
| 73 } | 81 } |
| 74 | 82 |
| 75 const char kActiveURL[] = "url-chunk"; | 83 const char kActiveURL[] = "url-chunk"; |
| 76 | 84 |
| 85 const char kGPUVendorID[] = "gpu-venid"; |
| 86 const char kGPUDeviceID[] = "gpu-devid"; |
| 87 const char kGPUDriverVersion[] = "gpu-driver"; |
| 88 const char kGPUPixelShaderVersion[] = "gpu-psver"; |
| 89 const char kGPUVertexShaderVersion[] = "gpu-vsver"; |
| 90 const char kGPUVendor[] = "gpu-gl-vendor"; |
| 91 const char kGPURenderer[] = "gpu-gl-renderer"; |
| 92 const char kGPUGLVersion[] = "gpu-glver"; |
| 93 |
| 77 #if defined(OS_MACOSX) | 94 #if defined(OS_MACOSX) |
| 78 namespace mac { | 95 namespace mac { |
| 79 | 96 |
| 80 const char kFirstNSException[] = "firstexception"; | 97 const char kFirstNSException[] = "firstexception"; |
| 81 const char kFirstNSExceptionTrace[] = "firstexception_bt"; | 98 const char kFirstNSExceptionTrace[] = "firstexception_bt"; |
| 82 | 99 |
| 83 const char kLastNSException[] = "lastexception"; | 100 const char kLastNSException[] = "lastexception"; |
| 84 const char kLastNSExceptionTrace[] = "lastexception_bt"; | 101 const char kLastNSExceptionTrace[] = "lastexception_bt"; |
| 85 | 102 |
| 86 const char kNSException[] = "nsexception"; | 103 const char kNSException[] = "nsexception"; |
| 87 const char kNSExceptionTrace[] = "nsexception_bt"; | 104 const char kNSExceptionTrace[] = "nsexception_bt"; |
| 88 | 105 |
| 89 const char kSendAction[] = "sendaction"; | 106 const char kSendAction[] = "sendaction"; |
| 90 | 107 |
| 91 const char kZombie[] = "zombie"; | 108 const char kZombie[] = "zombie"; |
| 92 const char kZombieTrace[] = "zombie_dealloc_bt"; | 109 const char kZombieTrace[] = "zombie_dealloc_bt"; |
| 93 | 110 |
| 94 } // namespace mac | 111 } // namespace mac |
| 95 #endif | 112 #endif |
| 96 | 113 |
| 97 } // namespace crash_keys | 114 } // namespace crash_keys |
| OLD | NEW |