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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « metrics_library.h ('k') | metrics_library_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« 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