aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/crash_generation/crash_generation_client.h
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-05-05 20:36:06 +0000
committerrsesek@chromium.org <rsesek@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-05-05 20:36:06 +0000
commit44ba0b2050f22376d623663652395de079a4b713 (patch)
treea250cd2d020782046d4f3b0052e55941dc724f9e /src/client/linux/crash_generation/crash_generation_client.h
parentFixing a build break on Linux. (diff)
downloadbreakpad-44ba0b2050f22376d623663652395de079a4b713.tar.xz
Make the Linux CrashGenerationClient an interface.
Also allow it to be set on the ExceptionHandler. This will allow Chromium's implementation to be properly treated as an out-of-process handler. BUG=https://code.google.com/p/chromium/issues/detail?id=349600 R=mark@chromium.org Review URL: https://breakpad.appspot.com/2664002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1324 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/crash_generation/crash_generation_client.h')
-rw-r--r--src/client/linux/crash_generation/crash_generation_client.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/client/linux/crash_generation/crash_generation_client.h b/src/client/linux/crash_generation/crash_generation_client.h
index 7139dff4..4e68424a 100644
--- a/src/client/linux/crash_generation/crash_generation_client.h
+++ b/src/client/linux/crash_generation/crash_generation_client.h
@@ -30,40 +30,36 @@
#ifndef CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_
#define CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_
+#include "common/basictypes.h"
+
#include <stddef.h>
namespace google_breakpad {
+// CrashGenerationClient is an interface for implementing out-of-process crash
+// dumping. The default implementation, accessed via the TryCreate() factory,
+// works in conjunction with the CrashGenerationServer to generate a minidump
+// via a remote process.
class CrashGenerationClient {
-public:
- ~CrashGenerationClient()
- {
- }
+ public:
+ CrashGenerationClient() {}
+ virtual ~CrashGenerationClient() {}
- // Request the crash server to generate a dump. |blob| is a hack,
- // see exception_handler.h and minidump_writer.h
- //
- // Return true if the dump was successful; false otherwise.
- bool RequestDump(const void* blob, size_t blob_size);
+ // Request the crash server to generate a dump. |blob| is an opaque
+ // CrashContext pointer from exception_handler.h.
+ // Returns true if the dump was successful; false otherwise.
+ virtual bool RequestDump(const void* blob, size_t blob_size) = 0;
- // Return a new CrashGenerationClient if |server_fd| is valid and
+ // Returns a new CrashGenerationClient if |server_fd| is valid and
// connects to a CrashGenerationServer. Otherwise, return NULL.
// The returned CrashGenerationClient* is owned by the caller of
// this function.
static CrashGenerationClient* TryCreate(int server_fd);
-private:
- CrashGenerationClient(int server_fd) : server_fd_(server_fd)
- {
- }
-
- int server_fd_;
-
- // prevent copy construction and assignment
- CrashGenerationClient(const CrashGenerationClient&);
- CrashGenerationClient& operator=(const CrashGenerationClient&);
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CrashGenerationClient);
};
-} // namespace google_breakpad
+} // namespace google_breakpad
-#endif // CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_
+#endif // CLIENT_LINUX_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_