| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 const char kViewCount[] = "view-count"; | 97 const char kViewCount[] = "view-count"; |
| 98 | 98 |
| 99 const char kZeroEncodeDetails[] = "zero-encode-details"; | 99 const char kZeroEncodeDetails[] = "zero-encode-details"; |
| 100 | 100 |
| 101 size_t RegisterChromeCrashKeys() { | 101 size_t RegisterChromeCrashKeys() { |
| 102 // The following keys may be chunked by the underlying crash logging system, | 102 // The following keys may be chunked by the underlying crash logging system, |
| 103 // but ultimately constitute a single key-value pair. | 103 // but ultimately constitute a single key-value pair. |
| 104 // | 104 // |
| 105 // If you're adding keys here, please also add them to the following list: | 105 // If you're adding keys here, please also add them to the following list: |
| 106 // chrome/app/chrome_crash_reporter_client_win.cc::RegisterCrashKeysHelper(). | 106 // chrome/app/chrome_crash_reporter_client_win.cc::RegisterCrashKeysHelper(), |
| 107 // and consider adding the new keys to the following list as well: |
| 108 // android_webview/common/crash_reporter/crash_keys.cc:: |
| 109 // RegisterWebViewCrashKeys(). |
| 107 base::debug::CrashKey fixed_keys[] = { | 110 base::debug::CrashKey fixed_keys[] = { |
| 108 #if defined(OS_MACOSX) || defined(OS_WIN) | 111 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 109 { kMetricsClientId, kSmallSize }, | 112 { kMetricsClientId, kSmallSize }, |
| 110 #else | 113 #else |
| 111 { kClientId, kSmallSize }, | 114 { kClientId, kSmallSize }, |
| 112 #endif | 115 #endif |
| 113 { kChannel, kSmallSize }, | 116 { kChannel, kSmallSize }, |
| 114 { kActiveURL, kLargeSize }, | 117 { kActiveURL, kLargeSize }, |
| 115 { kNumVariations, kSmallSize }, | 118 { kNumVariations, kSmallSize }, |
| 116 { kVariations, kHugeSize }, | 119 { kVariations, kHugeSize }, |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 } | 381 } |
| 379 | 382 |
| 380 ScopedPrinterInfo::~ScopedPrinterInfo() { | 383 ScopedPrinterInfo::~ScopedPrinterInfo() { |
| 381 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 384 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
| 382 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 385 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
| 383 base::debug::ClearCrashKey(key); | 386 base::debug::ClearCrashKey(key); |
| 384 } | 387 } |
| 385 } | 388 } |
| 386 | 389 |
| 387 } // namespace crash_keys | 390 } // namespace crash_keys |
| OLD | NEW |