Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: client/crashpad_client.h

Issue 1095273003: crashpad client for windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: review changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/crashpad_client.h
diff --git a/client/crashpad_client.h b/client/crashpad_client.h
index c33112cadb72cf18c3e322638d545b4cd4047954..e4a1369ba1341bf97d82635ee9e16ffc3233568d 100644
--- a/client/crashpad_client.h
+++ b/client/crashpad_client.h
@@ -49,6 +49,9 @@ class CrashpadClient {
//! send right corresponding to a receive right held by the handler process.
//! The handler process runs an exception server on this port.
//!
+ //! On Windows, SetHandler() is normally used instead since the handler is
+ //! started by other means.
+ //!
//! \param[in] handler The path to a Crashpad handler executable.
//! \param[in] database The path to a Crashpad database. The handler will be
//! started with this path as its `--database` argument.
@@ -69,9 +72,26 @@ class CrashpadClient {
const std::map<std::string, std::string>& annotations,
const std::vector<std::string>& arguments);
+ //! \brief Sets the IPC port of a presumably-running Crashpad handler process
+ //! which was started with StartHandler() or by other compatible means
+ //! and does an IPC message exchange to register this process with the
+ //! handler. However, just like StartHandler(), crashes are not serviced
+ //! until UseHandler() is called.
+ //!
+ //! The IPC port name (somehow) encodes enough information so that
+ //! registration is done with a crash handler using the appropiate database
+ //! and upload server.
+ //!
+ //! \param[in] ipc_port The full name of the crash handler IPC port.
+ //!
+ //! \return `true` on success and `false` on failure.
+#if defined(OS_WIN)
Mark Mentovai 2015/04/29 20:17:25 Move this above the //! brief that applies to it.
+ bool SetHandler(const std::string& ipc_port);
+#endif
Mark Mentovai 2015/04/29 20:17:25 and put a blank line after the #endif.
//! \brief Configures the process to direct its crashes to a Crashpad handler.
//!
- //! The Crashpad handler must previously have been started by StartHandler().
+ //! The Crashpad handler must previously have been started by StartHandler()
+ //! or configured by SetHandler().
//!
//! On Mac OS X, this method sets the task’s exception port for `EXC_CRASH`,
//! `EXC_RESOURCE`, and `EXC_GUARD` exceptions to the Mach send right obtained
@@ -85,6 +105,10 @@ class CrashpadClient {
//! have inherited it as their exception handler even after the process that
//! called StartHandler() exits.
//!
+ //! On Windows, this method sets the unhandled exception handler to a local
+ //! function that when reached it will "signal and wait" for the crash
Mark Mentovai 2015/04/29 20:17:25 Extraneous “it”.
+ //! handler process to create the dump.
+ //!
//! \return `true` on success, `false` on failure with a message logged.
bool UseHandler();
« no previous file with comments | « client/client.gyp ('k') | client/crashpad_client_win.cc » ('j') | client/crashpad_client_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698