OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/crash_keys/crash_keys.h" | 5 #include "components/crash_keys/crash_keys.h" |
6 | 6 |
7 #include "base/debug/crash_logging.h" | 7 #include "base/debug/crash_logging.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 | 12 |
13 namespace crash_keys { | 13 namespace crash_keys { |
14 | 14 |
15 #if defined(OS_MACOSX) | 15 #if defined(OS_MACOSX) |
16 // Crashpad owns the "guid" key. Chrome's metrics client ID is a separate ID | 16 // Crashpad owns the "guid" key. Chrome's metrics client ID is a separate ID |
17 // carried in a distinct "metrics_client_id" field. | 17 // carried in a distinct "metrics_client_id" field. |
18 const char kMetricsClientId[] = "metrics_client_id"; | 18 const char kMetricsClientId[] = "metrics_client_id"; |
19 #else | 19 #else |
20 const char kClientId[] = "guid"; | 20 const char kClientId[] = "guid"; |
21 #endif | 21 #endif |
22 | 22 |
23 const char kChannel[] = "channel"; | 23 const char kChannel[] = "channel"; |
24 | 24 |
25 const char kNumVariations[] = "num-experiments"; | 25 const char kNumVariations[] = "num-experiments"; |
26 const char kVariations[] = "variations"; | 26 const char kVariations[] = "variations"; |
27 | 27 |
| 28 const char kBug464926CrashKey[] = "bug-464926-info"; |
| 29 |
28 #if defined(OS_MACOSX) | 30 #if defined(OS_MACOSX) |
29 namespace mac { | 31 namespace mac { |
30 | 32 |
31 const char kZombie[] = "zombie"; | 33 const char kZombie[] = "zombie"; |
32 const char kZombieTrace[] = "zombie_dealloc_bt"; | 34 const char kZombieTrace[] = "zombie_dealloc_bt"; |
33 | 35 |
34 } // namespace mac | 36 } // namespace mac |
35 #endif | 37 #endif |
36 | 38 |
37 void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid) { | 39 void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (variations_string.size() + variation.size() >= kLargeSize) | 86 if (variations_string.size() + variation.size() >= kLargeSize) |
85 break; | 87 break; |
86 variations_string += variation; | 88 variations_string += variation; |
87 variations_string += ","; | 89 variations_string += ","; |
88 } | 90 } |
89 | 91 |
90 base::debug::SetCrashKeyValue(kVariations, variations_string); | 92 base::debug::SetCrashKeyValue(kVariations, variations_string); |
91 } | 93 } |
92 | 94 |
93 } // namespace crash_keys | 95 } // namespace crash_keys |
OLD | NEW |