Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: components/crash/core/common/crash_keys.cc

Issue 1416133003: Crashpad Windows: Use the Crashpad client instead of Breakpad on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn secondary, mac .S not on windows Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698