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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 size_t RegisterChromeCrashKeys() { | 85 size_t RegisterChromeCrashKeys() { |
86 // 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, |
87 // but ultimately constitute a single key-value pair. | 87 // but ultimately constitute a single key-value pair. |
88 base::debug::CrashKey fixed_keys[] = { | 88 base::debug::CrashKey fixed_keys[] = { |
89 #if defined(OS_MACOSX) | 89 #if defined(OS_MACOSX) || defined(OS_WIN) |
90 { kMetricsClientId, kSmallSize }, | 90 { kMetricsClientId, kSmallSize }, |
91 #else | 91 #else |
92 { kClientId, kSmallSize }, | 92 { kClientId, kSmallSize }, |
93 #endif | 93 #endif |
94 { kChannel, kSmallSize }, | 94 { kChannel, kSmallSize }, |
95 { kActiveURL, kLargeSize }, | 95 { kActiveURL, kLargeSize }, |
96 { kNumSwitches, kSmallSize }, | 96 { kNumSwitches, kSmallSize }, |
97 { kNumVariations, kSmallSize }, | 97 { kNumVariations, kSmallSize }, |
98 { kVariations, kLargeSize }, | 98 { kVariations, kLargeSize }, |
99 { kNumExtensionsCount, kSmallSize }, | 99 { kNumExtensionsCount, kSmallSize }, |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 } | 335 } |
336 | 336 |
337 ScopedPrinterInfo::~ScopedPrinterInfo() { | 337 ScopedPrinterInfo::~ScopedPrinterInfo() { |
338 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 338 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
339 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 339 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
340 base::debug::ClearCrashKey(key); | 340 base::debug::ClearCrashKey(key); |
341 } | 341 } |
342 } | 342 } |
343 | 343 |
344 } // namespace crash_keys | 344 } // namespace crash_keys |
OLD | NEW |