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