| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 "metrics_library.h" | 5 #include "metrics_library.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <sys/file.h> | 8 #include <sys/file.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 | 10 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 char message[kBufferSize]; | 248 char message[kBufferSize]; |
| 249 int32_t message_length = | 249 int32_t message_length = |
| 250 FormatChromeMessage(kBufferSize, message, | 250 FormatChromeMessage(kBufferSize, message, |
| 251 "useraction%c%s", '\0', action.c_str()); | 251 "useraction%c%s", '\0', action.c_str()); |
| 252 if (message_length < 0) | 252 if (message_length < 0) |
| 253 return false; | 253 return false; |
| 254 | 254 |
| 255 // Send the message. | 255 // Send the message. |
| 256 return SendMessageToChrome(message_length, message); | 256 return SendMessageToChrome(message_length, message); |
| 257 } | 257 } |
| 258 |
| 259 bool MetricsLibrary::SendCrashToUMA(const char *crash_kind) { |
| 260 // Format the message. |
| 261 char message[kBufferSize]; |
| 262 int32_t message_length = |
| 263 FormatChromeMessage(kBufferSize, message, |
| 264 "crash%c%s", '\0', crash_kind); |
| 265 |
| 266 if (message_length < 0) |
| 267 return false; |
| 268 |
| 269 // Send the message. |
| 270 return SendMessageToChrome(message_length, message); |
| 271 } |
| OLD | NEW |