summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/breakpad_linux.cc7
-rw-r--r--chrome/app/breakpad_linux.h1
-rw-r--r--chrome/browser/browser_main_gtk.cc13
3 files changed, 20 insertions, 1 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc
index 763d031..832c4ec 100644
--- a/chrome/app/breakpad_linux.cc
+++ b/chrome/app/breakpad_linux.cc
@@ -38,6 +38,7 @@
static const char kUploadURL[] =
"https://clients2.google.com/cr/report";
+static bool is_crash_reporter_enabled = false;
static uint64_t uptime = 0;
// Writes the value |v| as 16 hex characters to the memory pointed at by
@@ -682,6 +683,7 @@ static bool CrashDoneUpload(const char* dump_path,
}
void EnableCrashDumping(const bool unattended) {
+ is_crash_reporter_enabled = true;
if (unattended) {
FilePath dumps_path("/tmp");
PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path);
@@ -760,6 +762,7 @@ NonBrowserCrashHandler(const void* crash_context, size_t crash_context_size,
void EnableNonBrowserCrashDumping() {
const int fd = Singleton<base::GlobalDescriptors>()->Get(kCrashDumpSignal);
+ is_crash_reporter_enabled = true;
// We deliberately leak this object.
google_breakpad::ExceptionHandler* handler =
new google_breakpad::ExceptionHandler("" /* unused */, NULL, NULL,
@@ -807,3 +810,7 @@ void InitCrashReporter() {
else
uptime = 0;
}
+
+bool IsCrashReporterEnabled() {
+ return is_crash_reporter_enabled;
+}
diff --git a/chrome/app/breakpad_linux.h b/chrome/app/breakpad_linux.h
index 4e52257..1d89d62 100644
--- a/chrome/app/breakpad_linux.h
+++ b/chrome/app/breakpad_linux.h
@@ -8,6 +8,7 @@
#include <stdlib.h>
extern void InitCrashReporter();
+bool IsCrashReporterEnabled();
static const size_t kMaxActiveURLSize = 1024;
static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex.
diff --git a/chrome/browser/browser_main_gtk.cc b/chrome/browser/browser_main_gtk.cc
index beeb702..e27fe0b 100644
--- a/chrome/browser/browser_main_gtk.cc
+++ b/chrome/browser/browser_main_gtk.cc
@@ -5,9 +5,15 @@
#include "chrome/browser/browser_main.h"
#include "base/command_line.h"
+#include "base/debug_util.h"
#include "chrome/browser/browser_main_win.h"
+#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/common/result_codes.h"
+#if defined(USE_LINUX_BREAKPAD)
+#include "chrome/app/breakpad_linux.h"
+#endif
+
namespace Platform {
void WillInitializeMainMessageLoop(const MainFunctionParams& parameters) {
@@ -17,7 +23,12 @@ void DidEndMainMessageLoop() {
}
void RecordBreakpadStatusUMA(MetricsService* metrics) {
- // TODO(port): http://crbug.com/21732
+#if defined(USE_LINUX_BREAKPAD)
+ metrics->RecordBreakpadRegistration(IsCrashReporterEnabled());
+#else
+ metrics->RecordBreakpadRegistration(false);
+#endif
+ metrics->RecordBreakpadHasDebugger(DebugUtil::BeingDebugged());
}
} // namespace Platform