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

Unified Diff: metrics_library.cc

Issue 6211001: metrics: Send ability to notify chrome of system crashes (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/metrics.git@master
Patch Set: respond to review Created 9 years, 11 months 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
« no previous file with comments | « metrics_library.h ('k') | metrics_library_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: metrics_library.cc
diff --git a/metrics_library.cc b/metrics_library.cc
index 05e63acff5fd32861647adeefd80b450050863b1..f2046a35e50fb170140085507d1204f56d4fe783 100644
--- a/metrics_library.cc
+++ b/metrics_library.cc
@@ -255,3 +255,17 @@ bool MetricsLibrary::SendUserActionToUMA(const std::string& action) {
// Send the message.
return SendMessageToChrome(message_length, message);
}
+
+bool MetricsLibrary::SendCrashToUMA(const char *crash_kind) {
+ // Format the message.
+ char message[kBufferSize];
+ int32_t message_length =
+ FormatChromeMessage(kBufferSize, message,
+ "crash%c%s", '\0', crash_kind);
+
+ if (message_length < 0)
+ return false;
+
+ // Send the message.
+ return SendMessageToChrome(message_length, message);
+}
« no previous file with comments | « metrics_library.h ('k') | metrics_library_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698