| 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 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
| 17 #include "components/flags_ui/flags_ui_switches.h" | 17 #include "components/flags_ui/flags_ui_switches.h" |
| 18 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
| 19 #include "gpu/config/gpu_crash_keys.h" |
| 19 | 20 |
| 20 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
| 21 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 22 #include "gpu/command_buffer/service/gpu_switches.h" | 23 #include "gpu/command_buffer/service/gpu_switches.h" |
| 23 #include "ui/gl/gl_switches.h" | 24 #include "ui/gl/gl_switches.h" |
| 24 #endif | 25 #endif |
| 25 | 26 |
| 26 namespace crash_keys { | 27 namespace crash_keys { |
| 27 | 28 |
| 28 const char kActiveURL[] = "url-chunk"; | 29 const char kActiveURL[] = "url-chunk"; |
| 29 | 30 |
| 30 const char kFontKeyName[] = "font_key_name"; | 31 const char kFontKeyName[] = "font_key_name"; |
| 31 | 32 |
| 32 const char kExtensionID[] = "extension-%" PRIuS; | 33 const char kExtensionID[] = "extension-%" PRIuS; |
| 33 const char kNumExtensionsCount[] = "num-extensions"; | 34 const char kNumExtensionsCount[] = "num-extensions"; |
| 34 | 35 |
| 35 const char kShutdownType[] = "shutdown-type"; | 36 const char kShutdownType[] = "shutdown-type"; |
| 36 const char kBrowserUnpinTrace[] = "browser-unpin-trace"; | 37 const char kBrowserUnpinTrace[] = "browser-unpin-trace"; |
| 37 | 38 |
| 38 #if !defined(OS_ANDROID) | |
| 39 const char kGPUVendorID[] = "gpu-venid"; | |
| 40 const char kGPUDeviceID[] = "gpu-devid"; | |
| 41 #endif | |
| 42 const char kGPUDriverVersion[] = "gpu-driver"; | |
| 43 const char kGPUPixelShaderVersion[] = "gpu-psver"; | |
| 44 const char kGPUVertexShaderVersion[] = "gpu-vsver"; | |
| 45 #if defined(OS_MACOSX) | |
| 46 const char kGPUGLVersion[] = "gpu-glver"; | |
| 47 #elif defined(OS_POSIX) | |
| 48 const char kGPUVendor[] = "gpu-gl-vendor"; | |
| 49 const char kGPURenderer[] = "gpu-gl-renderer"; | |
| 50 #endif | |
| 51 | |
| 52 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 53 const char kHungRendererOutstandingAckCount[] = "hung-outstanding-acks"; | 40 const char kHungRendererOutstandingAckCount[] = "hung-outstanding-acks"; |
| 54 const char kHungRendererOutstandingEventType[] = "hung-outstanding-event-type"; | 41 const char kHungRendererOutstandingEventType[] = "hung-outstanding-event-type"; |
| 55 const char kHungRendererLastEventType[] = "hung-last-event-type"; | 42 const char kHungRendererLastEventType[] = "hung-last-event-type"; |
| 56 const char kHungRendererReason[] = "hung-reason"; | 43 const char kHungRendererReason[] = "hung-reason"; |
| 57 | 44 |
| 58 const char kThirdPartyModulesLoaded[] = "third-party-modules-loaded"; | 45 const char kThirdPartyModulesLoaded[] = "third-party-modules-loaded"; |
| 59 const char kThirdPartyModulesNotLoaded[] = "third-party-modules-not-loaded"; | 46 const char kThirdPartyModulesNotLoaded[] = "third-party-modules-not-loaded"; |
| 60 | 47 |
| 61 const char kIsEnterpriseManaged[] = "is-enterprise-managed"; | 48 const char kIsEnterpriseManaged[] = "is-enterprise-managed"; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 {kClientId, kSmallSize}, | 99 {kClientId, kSmallSize}, |
| 113 #endif | 100 #endif |
| 114 {kChannel, kSmallSize}, | 101 {kChannel, kSmallSize}, |
| 115 {kActiveURL, kLargeSize}, | 102 {kActiveURL, kLargeSize}, |
| 116 {kNumVariations, kSmallSize}, | 103 {kNumVariations, kSmallSize}, |
| 117 {kVariations, kHugeSize}, | 104 {kVariations, kHugeSize}, |
| 118 {kNumExtensionsCount, kSmallSize}, | 105 {kNumExtensionsCount, kSmallSize}, |
| 119 {kShutdownType, kSmallSize}, | 106 {kShutdownType, kSmallSize}, |
| 120 {kBrowserUnpinTrace, kMediumSize}, | 107 {kBrowserUnpinTrace, kMediumSize}, |
| 121 #if !defined(OS_ANDROID) | 108 #if !defined(OS_ANDROID) |
| 122 {kGPUVendorID, kSmallSize}, | 109 {gpu::crash_keys::kGPUVendorID, kSmallSize}, |
| 123 {kGPUDeviceID, kSmallSize}, | 110 {gpu::crash_keys::kGPUDeviceID, kSmallSize}, |
| 124 #endif | 111 #endif |
| 125 {kGPUDriverVersion, kSmallSize}, | 112 {gpu::crash_keys::kGPUDriverVersion, kSmallSize}, |
| 126 {kGPUPixelShaderVersion, kSmallSize}, | 113 {gpu::crash_keys::kGPUPixelShaderVersion, kSmallSize}, |
| 127 {kGPUVertexShaderVersion, kSmallSize}, | 114 {gpu::crash_keys::kGPUVertexShaderVersion, kSmallSize}, |
| 128 #if defined(OS_MACOSX) | 115 #if defined(OS_MACOSX) |
| 129 {kGPUGLVersion, kSmallSize}, | 116 {gpu::crash_keys::kGPUGLVersion, kSmallSize}, |
| 130 #elif defined(OS_POSIX) | 117 #elif defined(OS_POSIX) |
| 131 {kGPUVendor, kSmallSize}, | 118 {gpu::crash_keys::kGPUVendor, kSmallSize}, |
| 132 {kGPURenderer, kSmallSize}, | 119 {gpu::crash_keys::kGPURenderer, kSmallSize}, |
| 133 #endif | 120 #endif |
| 134 | 121 |
| 135 // content/: | 122 // content/: |
| 136 {"bad_message_reason", kSmallSize}, | 123 {"bad_message_reason", kSmallSize}, |
| 137 {"discardable-memory-allocated", kSmallSize}, | 124 {"discardable-memory-allocated", kSmallSize}, |
| 138 {"discardable-memory-free", kSmallSize}, | 125 {"discardable-memory-free", kSmallSize}, |
| 139 {kFontKeyName, kSmallSize}, | 126 {kFontKeyName, kSmallSize}, |
| 140 {"mojo-message-error", kMediumSize}, | 127 {"mojo-message-error", kMediumSize}, |
| 141 {"ppapi_path", kMediumSize}, | 128 {"ppapi_path", kMediumSize}, |
| 142 {"subresource_url", kLargeSize}, | 129 {"subresource_url", kLargeSize}, |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 370 } |
| 384 | 371 |
| 385 ScopedPrinterInfo::~ScopedPrinterInfo() { | 372 ScopedPrinterInfo::~ScopedPrinterInfo() { |
| 386 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 373 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
| 387 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 374 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
| 388 base::debug::ClearCrashKey(key); | 375 base::debug::ClearCrashKey(key); |
| 389 } | 376 } |
| 390 } | 377 } |
| 391 | 378 |
| 392 } // namespace crash_keys | 379 } // namespace crash_keys |
| OLD | NEW |