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