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

Unified Diff: chromecast/crash/linux/crash_util.h

Issue 1154383006: Adding crash utilities to chromecast/crash. (Closed) Base URL: https://eureka-internal.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 6 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
Index: chromecast/crash/linux/crash_util.h
diff --git a/chromecast/crash/linux/crash_util.h b/chromecast/crash/linux/crash_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..44e3396f1d914de5ec64eba436f05b7bdb6a3434
--- /dev/null
+++ b/chromecast/crash/linux/crash_util.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_CRASH_LINUX_CRASH_UTIL_H_
+#define CHROMECAST_CRASH_LINUX_CRASH_UTIL_H_
+
+#include <stdint.h>
+
+#include <string>
+
+#include "base/callback.h"
+
+namespace chromecast {
+
+class CrashUtil {
+ public:
+ // Helper function to request upload an existing minidump file.
+ static void RequestUploadCrashDump(const std::string& existing_minidump_path,
alokp 2015/06/15 17:51:48 should it return success/failure?
slan 2015/06/16 14:57:49 Done.
+ const std::string& crashed_process_name,
+ uint64_t crashed_process_start_time_ms);
+
+ // Util function to get current time in ms. This is used to record
+ // crashed_process_start_time_ms in client side.
+ static uint64_t GetCurrentTimeMs();
+
+ // Call this to set a callback to be used instead of invoking an executable
+ // in a seperate process. See MinidumpWriter::SetDumpStateCbForTest() for more
+ // details on this callback's signature.
+ static void SetDumpStateCbForTest(
+ const base::Callback<int(const std::string&)>& cb);
+};
+
+} // namespace chromecast
+
+#endif // CHROMECAST_CRASH_LINUX_CRASH_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698