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" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 #if defined(KASKO) | 76 #if defined(KASKO) |
77 const char kKaskoGuid[] = "kasko-guid"; | 77 const char kKaskoGuid[] = "kasko-guid"; |
78 const char kKaskoEquivalentGuid[] = "kasko-equivalent-guid"; | 78 const char kKaskoEquivalentGuid[] = "kasko-equivalent-guid"; |
79 #endif | 79 #endif |
80 | 80 |
81 const char kViewCount[] = "view-count"; | 81 const char kViewCount[] = "view-count"; |
82 | 82 |
83 const char kZeroEncodeDetails[] = "zero-encode-details"; | 83 const char kZeroEncodeDetails[] = "zero-encode-details"; |
84 | 84 |
| 85 const char kFastErrAbortTrace[] = "fast-err-abort-trace"; |
| 86 |
85 size_t RegisterChromeCrashKeys() { | 87 size_t RegisterChromeCrashKeys() { |
86 // The following keys may be chunked by the underlying crash logging system, | 88 // The following keys may be chunked by the underlying crash logging system, |
87 // but ultimately constitute a single key-value pair. | 89 // but ultimately constitute a single key-value pair. |
88 base::debug::CrashKey fixed_keys[] = { | 90 base::debug::CrashKey fixed_keys[] = { |
89 #if defined(OS_MACOSX) | 91 #if defined(OS_MACOSX) |
90 { kMetricsClientId, kSmallSize }, | 92 { kMetricsClientId, kSmallSize }, |
91 #else | 93 #else |
92 { kClientId, kSmallSize }, | 94 { kClientId, kSmallSize }, |
93 #endif | 95 #endif |
94 { kChannel, kSmallSize }, | 96 { kChannel, kSmallSize }, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // media/: | 141 // media/: |
140 { "VideoCaptureDeviceQTKit", kSmallSize }, | 142 { "VideoCaptureDeviceQTKit", kSmallSize }, |
141 #endif | 143 #endif |
142 #if defined(KASKO) | 144 #if defined(KASKO) |
143 { kKaskoGuid, kSmallSize }, | 145 { kKaskoGuid, kSmallSize }, |
144 { kKaskoEquivalentGuid, kSmallSize }, | 146 { kKaskoEquivalentGuid, kSmallSize }, |
145 #endif | 147 #endif |
146 { kBug464926CrashKey, kSmallSize }, | 148 { kBug464926CrashKey, kSmallSize }, |
147 { kViewCount, kSmallSize }, | 149 { kViewCount, kSmallSize }, |
148 { kZeroEncodeDetails, kSmallSize }, | 150 { kZeroEncodeDetails, kSmallSize }, |
| 151 { kFastErrAbortTrace, kMediumSize}, |
149 }; | 152 }; |
150 | 153 |
151 // This dynamic set of keys is used for sets of key value pairs when gathering | 154 // This dynamic set of keys is used for sets of key value pairs when gathering |
152 // a collection of data, like command line switches or extension IDs. | 155 // a collection of data, like command line switches or extension IDs. |
153 std::vector<base::debug::CrashKey> keys( | 156 std::vector<base::debug::CrashKey> keys( |
154 fixed_keys, fixed_keys + arraysize(fixed_keys)); | 157 fixed_keys, fixed_keys + arraysize(fixed_keys)); |
155 | 158 |
156 // Register the switches. | 159 // Register the switches. |
157 { | 160 { |
158 // The fixed_keys names are string constants. Use static storage for | 161 // The fixed_keys names are string constants. Use static storage for |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 } | 338 } |
336 | 339 |
337 ScopedPrinterInfo::~ScopedPrinterInfo() { | 340 ScopedPrinterInfo::~ScopedPrinterInfo() { |
338 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 341 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
339 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 342 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
340 base::debug::ClearCrashKey(key); | 343 base::debug::ClearCrashKey(key); |
341 } | 344 } |
342 } | 345 } |
343 | 346 |
344 } // namespace crash_keys | 347 } // namespace crash_keys |
OLD | NEW |