| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 const char kSwitch[] = "switch-%" PRIuS; | 66 const char kSwitch[] = "switch-%" PRIuS; |
| 67 const char kNumSwitches[] = "num-switches"; | 67 const char kNumSwitches[] = "num-switches"; |
| 68 | 68 |
| 69 const char kNumVariations[] = "num-experiments"; | 69 const char kNumVariations[] = "num-experiments"; |
| 70 const char kVariations[] = "variations"; | 70 const char kVariations[] = "variations"; |
| 71 | 71 |
| 72 const char kExtensionID[] = "extension-%" PRIuS; | 72 const char kExtensionID[] = "extension-%" PRIuS; |
| 73 const char kNumExtensionsCount[] = "num-extensions"; | 73 const char kNumExtensionsCount[] = "num-extensions"; |
| 74 | 74 |
| 75 const char kNumberOfViews[] = "num-views"; | |
| 76 | |
| 77 const char kShutdownType[] = "shutdown-type"; | 75 const char kShutdownType[] = "shutdown-type"; |
| 78 | 76 |
| 79 #if !defined(OS_ANDROID) | 77 #if !defined(OS_ANDROID) |
| 80 const char kGPUVendorID[] = "gpu-venid"; | 78 const char kGPUVendorID[] = "gpu-venid"; |
| 81 const char kGPUDeviceID[] = "gpu-devid"; | 79 const char kGPUDeviceID[] = "gpu-devid"; |
| 82 #endif | 80 #endif |
| 83 const char kGPUDriverVersion[] = "gpu-driver"; | 81 const char kGPUDriverVersion[] = "gpu-driver"; |
| 84 const char kGPUPixelShaderVersion[] = "gpu-psver"; | 82 const char kGPUPixelShaderVersion[] = "gpu-psver"; |
| 85 const char kGPUVertexShaderVersion[] = "gpu-vsver"; | 83 const char kGPUVertexShaderVersion[] = "gpu-vsver"; |
| 86 #if defined(OS_MACOSX) | 84 #if defined(OS_MACOSX) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // The following keys may be chunked by the underlying crash logging system, | 118 // The following keys may be chunked by the underlying crash logging system, |
| 121 // but ultimately constitute a single key-value pair. | 119 // but ultimately constitute a single key-value pair. |
| 122 base::debug::CrashKey fixed_keys[] = { | 120 base::debug::CrashKey fixed_keys[] = { |
| 123 { kClientId, kSmallSize }, | 121 { kClientId, kSmallSize }, |
| 124 { kChannel, kSmallSize }, | 122 { kChannel, kSmallSize }, |
| 125 { kActiveURL, kLargeSize }, | 123 { kActiveURL, kLargeSize }, |
| 126 { kNumSwitches, kSmallSize }, | 124 { kNumSwitches, kSmallSize }, |
| 127 { kNumVariations, kSmallSize }, | 125 { kNumVariations, kSmallSize }, |
| 128 { kVariations, kLargeSize }, | 126 { kVariations, kLargeSize }, |
| 129 { kNumExtensionsCount, kSmallSize }, | 127 { kNumExtensionsCount, kSmallSize }, |
| 130 { kNumberOfViews, kSmallSize }, | |
| 131 { kShutdownType, kSmallSize }, | 128 { kShutdownType, kSmallSize }, |
| 132 #if !defined(OS_ANDROID) | 129 #if !defined(OS_ANDROID) |
| 133 { kGPUVendorID, kSmallSize }, | 130 { kGPUVendorID, kSmallSize }, |
| 134 { kGPUDeviceID, kSmallSize }, | 131 { kGPUDeviceID, kSmallSize }, |
| 135 #endif | 132 #endif |
| 136 { kGPUDriverVersion, kSmallSize }, | 133 { kGPUDriverVersion, kSmallSize }, |
| 137 { kGPUPixelShaderVersion, kSmallSize }, | 134 { kGPUPixelShaderVersion, kSmallSize }, |
| 138 { kGPUVertexShaderVersion, kSmallSize }, | 135 { kGPUVertexShaderVersion, kSmallSize }, |
| 139 #if defined(OS_MACOSX) | 136 #if defined(OS_MACOSX) |
| 140 { kGPUGLVersion, kSmallSize }, | 137 { kGPUGLVersion, kSmallSize }, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 393 } |
| 397 | 394 |
| 398 ScopedPrinterInfo::~ScopedPrinterInfo() { | 395 ScopedPrinterInfo::~ScopedPrinterInfo() { |
| 399 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 396 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
| 400 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 397 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
| 401 base::debug::ClearCrashKey(key); | 398 base::debug::ClearCrashKey(key); |
| 402 } | 399 } |
| 403 } | 400 } |
| 404 | 401 |
| 405 } // namespace crash_keys | 402 } // namespace crash_keys |
| OLD | NEW |