Chromium Code Reviews| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 | 83 |
| 84 const char kViewCount[] = "view-count"; | 84 const char kViewCount[] = "view-count"; |
| 85 | 85 |
| 86 const char kZeroEncodeDetails[] = "zero-encode-details"; | 86 const char kZeroEncodeDetails[] = "zero-encode-details"; |
| 87 | 87 |
| 88 size_t RegisterChromeCrashKeys() { | 88 size_t RegisterChromeCrashKeys() { |
| 89 // The following keys may be chunked by the underlying crash logging system, | 89 // The following keys may be chunked by the underlying crash logging system, |
| 90 // but ultimately constitute a single key-value pair. | 90 // but ultimately constitute a single key-value pair. |
| 91 // | 91 // |
| 92 // If you're adding keys here, please also add them to the list in | 92 // If you're adding keys here, please also add them to the list in |
| 93 // //blimp/engine/app/blimp_engine_crash_keys.cc | 93 // //blimp/engine/app/blimp_engine_crash_keys.cc |
|
Robert Sesek
2016/07/08 15:00:19
Need to do this too.
falken
2016/07/08 15:09:09
Done.
| |
| 94 base::debug::CrashKey fixed_keys[] = { | 94 base::debug::CrashKey fixed_keys[] = { |
| 95 #if defined(OS_MACOSX) || defined(OS_WIN) | 95 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 96 { kMetricsClientId, kSmallSize }, | 96 { kMetricsClientId, kSmallSize }, |
| 97 #else | 97 #else |
| 98 { kClientId, kSmallSize }, | 98 { kClientId, kSmallSize }, |
| 99 #endif | 99 #endif |
| 100 { kChannel, kSmallSize }, | 100 { kChannel, kSmallSize }, |
| 101 { kActiveURL, kLargeSize }, | 101 { kActiveURL, kLargeSize }, |
| 102 { kNumVariations, kSmallSize }, | 102 { kNumVariations, kSmallSize }, |
| 103 { kVariations, kLargeSize }, | 103 { kVariations, kLargeSize }, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 { "aci_wrong_sp_extension_id", kSmallSize }, | 195 { "aci_wrong_sp_extension_id", kSmallSize }, |
| 196 | 196 |
| 197 // Temporary for http://crbug.com/621730 | 197 // Temporary for http://crbug.com/621730 |
| 198 { "postmessage_src_origin", kMediumSize }, | 198 { "postmessage_src_origin", kMediumSize }, |
| 199 { "postmessage_dst_origin", kMediumSize }, | 199 { "postmessage_dst_origin", kMediumSize }, |
| 200 { "postmessage_dst_url", kLargeSize }, | 200 { "postmessage_dst_url", kLargeSize }, |
| 201 { "postmessage_script_info", kLargeSize }, | 201 { "postmessage_script_info", kLargeSize }, |
| 202 | 202 |
| 203 // Temporary for https://crbug.com/616149. | 203 // Temporary for https://crbug.com/616149. |
| 204 { "existing_extension_pref_value_type", crash_keys::kSmallSize }, | 204 { "existing_extension_pref_value_type", crash_keys::kSmallSize }, |
| 205 | |
| 206 // Temporary for https://crbug.com/625040 | |
| 207 { "swdh_not_handled_message_type", crash_keys::kMediumSize }, | |
| 208 { "swdh_not_handled_worker_status", crash_keys::kMediumSize }, | |
| 205 }; | 209 }; |
| 206 | 210 |
| 207 // This dynamic set of keys is used for sets of key value pairs when gathering | 211 // This dynamic set of keys is used for sets of key value pairs when gathering |
| 208 // a collection of data, like command line switches or extension IDs. | 212 // a collection of data, like command line switches or extension IDs. |
| 209 std::vector<base::debug::CrashKey> keys( | 213 std::vector<base::debug::CrashKey> keys( |
| 210 fixed_keys, fixed_keys + arraysize(fixed_keys)); | 214 fixed_keys, fixed_keys + arraysize(fixed_keys)); |
| 211 | 215 |
| 212 crash_keys::GetCrashKeysForCommandLineSwitches(&keys); | 216 crash_keys::GetCrashKeysForCommandLineSwitches(&keys); |
| 213 | 217 |
| 214 // Register the extension IDs. | 218 // Register the extension IDs. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 339 } | 343 } |
| 340 | 344 |
| 341 ScopedPrinterInfo::~ScopedPrinterInfo() { | 345 ScopedPrinterInfo::~ScopedPrinterInfo() { |
| 342 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 346 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
| 343 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 347 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
| 344 base::debug::ClearCrashKey(key); | 348 base::debug::ClearCrashKey(key); |
| 345 } | 349 } |
| 346 } | 350 } |
| 347 | 351 |
| 348 } // namespace crash_keys | 352 } // namespace crash_keys |
| OLD | NEW |