| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } // namespace mac | 73 } // namespace mac |
| 74 #endif | 74 #endif |
| 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"; |
| 84 |
| 83 size_t RegisterChromeCrashKeys() { | 85 size_t RegisterChromeCrashKeys() { |
| 84 // The following keys may be chunked by the underlying crash logging system, | 86 // The following keys may be chunked by the underlying crash logging system, |
| 85 // but ultimately constitute a single key-value pair. | 87 // but ultimately constitute a single key-value pair. |
| 86 base::debug::CrashKey fixed_keys[] = { | 88 base::debug::CrashKey fixed_keys[] = { |
| 87 #if defined(OS_MACOSX) | 89 #if defined(OS_MACOSX) |
| 88 { kMetricsClientId, kSmallSize }, | 90 { kMetricsClientId, kSmallSize }, |
| 89 #else | 91 #else |
| 90 { kClientId, kSmallSize }, | 92 { kClientId, kSmallSize }, |
| 91 #endif | 93 #endif |
| 92 { kChannel, kSmallSize }, | 94 { kChannel, kSmallSize }, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 { "rwhvm_window", kMediumSize }, | 138 { "rwhvm_window", kMediumSize }, |
| 137 // media/: | 139 // media/: |
| 138 { "VideoCaptureDeviceQTKit", kSmallSize }, | 140 { "VideoCaptureDeviceQTKit", kSmallSize }, |
| 139 #endif | 141 #endif |
| 140 #if defined(KASKO) | 142 #if defined(KASKO) |
| 141 { kKaskoGuid, kSmallSize }, | 143 { kKaskoGuid, kSmallSize }, |
| 142 { kKaskoEquivalentGuid, kSmallSize }, | 144 { kKaskoEquivalentGuid, kSmallSize }, |
| 143 #endif | 145 #endif |
| 144 { kBug464926CrashKey, kSmallSize }, | 146 { kBug464926CrashKey, kSmallSize }, |
| 145 { kViewCount, kSmallSize }, | 147 { kViewCount, kSmallSize }, |
| 148 { kZeroEncodeDetails, kSmallSize }, |
| 146 }; | 149 }; |
| 147 | 150 |
| 148 // This dynamic set of keys is used for sets of key value pairs when gathering | 151 // This dynamic set of keys is used for sets of key value pairs when gathering |
| 149 // a collection of data, like command line switches or extension IDs. | 152 // a collection of data, like command line switches or extension IDs. |
| 150 std::vector<base::debug::CrashKey> keys( | 153 std::vector<base::debug::CrashKey> keys( |
| 151 fixed_keys, fixed_keys + arraysize(fixed_keys)); | 154 fixed_keys, fixed_keys + arraysize(fixed_keys)); |
| 152 | 155 |
| 153 // Register the switches. | 156 // Register the switches. |
| 154 { | 157 { |
| 155 // The fixed_keys names are string constants. Use static storage for | 158 // The fixed_keys names are string constants. Use static storage for |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 335 } |
| 333 | 336 |
| 334 ScopedPrinterInfo::~ScopedPrinterInfo() { | 337 ScopedPrinterInfo::~ScopedPrinterInfo() { |
| 335 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 338 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
| 336 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 339 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
| 337 base::debug::ClearCrashKey(key); | 340 base::debug::ClearCrashKey(key); |
| 338 } | 341 } |
| 339 } | 342 } |
| 340 | 343 |
| 341 } // namespace crash_keys | 344 } // namespace crash_keys |
| OLD | NEW |