Chromium Code Reviews| Index: components/crash/core/common/crash_keys.cc |
| diff --git a/components/crash/core/common/crash_keys.cc b/components/crash/core/common/crash_keys.cc |
| index c0afc6a14bde0ef66ddd94777434472fa6ebdd56..cf888283f5dfd9fa946cafad41a7f7b60dc6a598 100644 |
| --- a/components/crash/core/common/crash_keys.cc |
| +++ b/components/crash/core/common/crash_keys.cc |
| @@ -16,6 +16,9 @@ namespace crash_keys { |
| // Crashpad owns the "guid" key. Chrome's metrics client ID is a separate ID |
| // carried in a distinct "metrics_client_id" field. |
| const char kMetricsClientId[] = "metrics_client_id"; |
| +#elif defined(OS_WIN) // TODO(scottmg): While transitioning to Crashpad. |
| +const char kMetricsClientId[] = "metrics_client_id"; |
| +const char kClientId[] = "guid"; |
|
Mark Mentovai
2015/11/19 22:21:38
Crashpad owns the "guid" key, what’s this about?
scottmg
2015/11/20 19:52:48
The Breakpad-using targets use this file too (cont
Mark Mentovai
2015/11/20 20:00:23
scottmg wrote:
scottmg
2015/11/20 21:30:10
Done.
|
| #else |
| const char kClientId[] = "guid"; |
| #endif |
| @@ -44,7 +47,7 @@ void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid) { |
| if (stripped_guid.empty()) |
| return; |
| -#if defined(OS_MACOSX) |
| +#if defined(OS_MACOSX) || defined(OS_WIN) |
| // The crash client ID is maintained by Crashpad and is distinct from the |
| // metrics client ID, which is carried in its own key. |
| base::debug::SetCrashKeyValue(kMetricsClientId, stripped_guid); |
| @@ -56,7 +59,7 @@ void SetMetricsClientIdFromGUID(const std::string& metrics_client_guid) { |
| } |
| void ClearMetricsClientId() { |
| -#if defined(OS_MACOSX) |
| +#if defined(OS_MACOSX) || defined(OS_WIN) |
| // Crashpad always monitors for crashes, but doesn't upload them when |
| // crash reporting is disabled. The preference to upload crash reports is |
| // linked to the preference for metrics reporting. When metrics reporting is |