Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / chromecast / crash / linux / crash_util.h
blob04de56516761e35ff926d647a8301be780cb783d
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_CRASH_LINUX_CRASH_UTIL_H_
6 #define CHROMECAST_CRASH_LINUX_CRASH_UTIL_H_
8 #include <stdint.h>
10 #include <string>
12 #include "base/callback.h"
14 namespace chromecast {
16 class CrashUtil {
17 public:
18 // Helper function to request upload an existing minidump file. Returns true
19 // on success, false otherwise.
20 static bool RequestUploadCrashDump(const std::string& existing_minidump_path,
21 const std::string& crashed_process_name,
22 uint64_t crashed_process_start_time_ms);
24 // Util function to get current time in ms. This is used to record
25 // crashed_process_start_time_ms in client side.
26 static uint64_t GetCurrentTimeMs();
28 // Call this to set a callback to be used instead of invoking an executable
29 // in a seperate process. See MinidumpWriter::SetDumpStateCbForTest() for more
30 // details on this callback's signature.
31 static void SetDumpStateCbForTest(
32 const base::Callback<int(const std::string&)>& cb);
35 } // namespace chromecast
37 #endif // CHROMECAST_CRASH_LINUX_CRASH_UTIL_H_