| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 //! specified in this parameter. | 65 //! specified in this parameter. |
| 66 //! | 66 //! |
| 67 //! \return `true` on success, `false` on failure with a message logged. | 67 //! \return `true` on success, `false` on failure with a message logged. |
| 68 bool StartHandler(const base::FilePath& handler, | 68 bool StartHandler(const base::FilePath& handler, |
| 69 const base::FilePath& database, | 69 const base::FilePath& database, |
| 70 const std::string& url, | 70 const std::string& url, |
| 71 const std::map<std::string, std::string>& annotations, | 71 const std::map<std::string, std::string>& annotations, |
| 72 const std::vector<std::string>& arguments); | 72 const std::vector<std::string>& arguments); |
| 73 | 73 |
| 74 #if defined(OS_WIN) || DOXYGEN | 74 #if defined(OS_WIN) || DOXYGEN |
| 75 //! \brief Sets the IPC port of a presumably-running Crashpad handler process | 75 //! \brief Sets the IPC pipe of a presumably-running Crashpad handler process |
| 76 //! which was started with StartHandler() or by other compatible means | 76 //! which was started with StartHandler() or by other compatible means |
| 77 //! and does an IPC message exchange to register this process with the | 77 //! and does an IPC message exchange to register this process with the |
| 78 //! handler. However, just like StartHandler(), crashes are not serviced | 78 //! handler. However, just like StartHandler(), crashes are not serviced |
| 79 //! until UseHandler() is called. | 79 //! until UseHandler() is called. |
| 80 //! | 80 //! |
| 81 //! The IPC port name (somehow) encodes enough information so that | |
| 82 //! registration is done with a crash handler using the appropriate database | |
| 83 //! and upload server. | |
| 84 //! | |
| 85 //! \param[in] ipc_pipe The full name of the crash handler IPC pipe. This is | 81 //! \param[in] ipc_pipe The full name of the crash handler IPC pipe. This is |
| 86 //! a string of the form `"\\.\pipe\NAME"`. | 82 //! a string of the form `"\\.\pipe\NAME"`. |
| 87 //! | 83 //! |
| 88 //! \return `true` on success and `false` on failure. | 84 //! \return `true` on success and `false` on failure. |
| 89 bool SetHandlerIPCPipe(const std::wstring& ipc_pipe); | 85 bool SetHandlerIPCPipe(const std::wstring& ipc_pipe); |
| 90 | 86 |
| 87 //! \brief Retrieves the IPC pipe name used to register with the Crashpad |
| 88 //! handler. |
| 89 //! |
| 90 //! This method retrieves the IPC pipe name set by SetHandlerIPCPipe(), or a |
| 91 //! suitable IPC pipe name chosen by StartHandler(). It is intended to be used |
| 92 //! to obtain the IPC pipe name so that it may be passed to other processes, |
| 93 //! so that they may register with an existing Crashpad handler by calling |
| 94 //! SetHandlerIPCPipe(). |
| 95 //! |
| 96 //! This method is only defined on Windows. |
| 97 //! |
| 98 //! \return The full name of the crash handler IPC pipe, a string of the form |
| 99 //! `"\\.\pipe\NAME"`. |
| 100 std::wstring GetHandlerIPCPipe() const; |
| 101 |
| 91 //! \brief Requests that the handler capture a dump even though there hasn't | 102 //! \brief Requests that the handler capture a dump even though there hasn't |
| 92 //! been a crash. | 103 //! been a crash. |
| 93 //! | 104 //! |
| 94 //! \param[in] context A `CONTEXT`, generally captured by CaptureContext() or | 105 //! \param[in] context A `CONTEXT`, generally captured by CaptureContext() or |
| 95 //! similar. | 106 //! similar. |
| 96 static void DumpWithoutCrash(const CONTEXT& context); | 107 static void DumpWithoutCrash(const CONTEXT& context); |
| 97 #endif | 108 #endif |
| 98 | 109 |
| 99 //! \brief Configures the process to direct its crashes to a Crashpad handler. | 110 //! \brief Configures the process to direct its crashes to a Crashpad handler. |
| 100 //! | 111 //! |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 #elif defined(OS_WIN) | 158 #elif defined(OS_WIN) |
| 148 std::wstring ipc_pipe_; | 159 std::wstring ipc_pipe_; |
| 149 #endif | 160 #endif |
| 150 | 161 |
| 151 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); | 162 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); |
| 152 }; | 163 }; |
| 153 | 164 |
| 154 } // namespace crashpad | 165 } // namespace crashpad |
| 155 | 166 |
| 156 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ | 167 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ |
| OLD | NEW |