summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 02:02:20 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 02:02:20 +0000
commitb8d6ae159610e1b80806ffcc8a2916532eb659c3 (patch)
tree020548b9d56251d7f1663a0e772e81a463a76625 /chrome/app
parenta95631cb9427e4d20c243dcd0f36da3fd3e7cb55 (diff)
downloadchromium_src-b8d6ae159610e1b80806ffcc8a2916532eb659c3.zip
chromium_src-b8d6ae159610e1b80806ffcc8a2916532eb659c3.tar.gz
chromium_src-b8d6ae159610e1b80806ffcc8a2916532eb659c3.tar.bz2
Linux: Implement RecordBreakpadStatusUMA.
BUG=21732 TEST=none Review URL: http://codereview.chromium.org/489002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/breakpad_linux.cc7
-rw-r--r--chrome/app/breakpad_linux.h1
2 files changed, 8 insertions, 0 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.