summaryrefslogtreecommitdiff
path: root/include/desktop
diff options
context:
space:
mode:
authorGopi Krishna Menon <gopi.menon@collabora.com>2021-06-07 14:21:33 +0000
committerTor Lillqvist <tml@collabora.com>2021-06-16 14:45:35 +0200
commit4b925781760ba84e62cb847ddfe8f8c667a44c95 (patch)
tree0aac7bdda3cae5d84a0845eb42e0b6ce8d9ac43c /include/desktop
parent3f9fcf0e7f154e49bbffeaea925edb6055add494 (diff)
Add Active App Name Field To Crash Report
Adds a Active-App field in Crash Report to assist in investigating the crashes Change-Id: I30e5f307045b8e5def9986447551f39e70b94edc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116786 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include/desktop')
-rw-r--r--include/desktop/crashreport.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/desktop/crashreport.hxx b/include/desktop/crashreport.hxx
index 8d55b85487d0..c16b4a7eb80b 100644
--- a/include/desktop/crashreport.hxx
+++ b/include/desktop/crashreport.hxx
@@ -56,8 +56,12 @@ public:
static bool IsDumpEnable();
+ static void setActiveApp(const OUString& rActiveApp);
+ static OUString currentActiveApp();
+
private:
static osl::Mutex maMutex;
+ static osl::Mutex maActiveNameMutex;
static bool mbInit;
typedef struct _mpair
{
@@ -72,6 +76,7 @@ private:
typedef std::vector<mpair> vmaKeyValues;
static vmaKeyValues maKeyValues; // used to temporarily save entries before the old info has been uploaded
+ static OUString mActiveApp;
static std::unique_ptr<google_breakpad::ExceptionHandler> mpExceptionHandler;
@@ -88,6 +93,11 @@ private:
// // the code without linking to the lib and without adding HAVE_FEATURE_BREAKPAD
// // everywhere we want to log something to the crash report system.
inline static void addKeyValue(SAL_UNUSED_PARAMETER const OUString& /*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/, SAL_UNUSED_PARAMETER tAddKeyHandling /*AddKeyHandling*/) {};
+ inline static void setActiveApp(SAL_UNUSED_PARAMETER const OUString& /*rActiveApp*/) {};
+ inline static OUString currentActiveApp()
+ {
+ return OUString();
+ };
#endif // HAVE_FEATURE_BREAKPAD
};