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 | 81 //! The IPC pipe name (somehow) encodes enough information so that |
scottmg
2015/11/02 22:15:40
This paragraph doesn't make sense any longer.
Mark Mentovai
2015/11/03 00:08:45
scottmg wrote:
| |
82 //! registration is done with a crash handler using the appropriate database | 82 //! registration is done with a crash handler using the appropriate database |
83 //! and upload server. | 83 //! and upload server. |
84 //! | 84 //! |
85 //! \param[in] ipc_pipe The full name of the crash handler IPC pipe. This is | 85 //! \param[in] ipc_pipe The full name of the crash handler IPC pipe. This is |
86 //! a string of the form `"\\.\pipe\NAME"`. | 86 //! a string of the form `"\\.\pipe\NAME"`. |
87 //! | 87 //! |
88 //! \return `true` on success and `false` on failure. | 88 //! \return `true` on success and `false` on failure. |
89 bool SetHandlerIPCPipe(const std::wstring& ipc_pipe); | 89 bool SetHandlerIPCPipe(const std::wstring& ipc_pipe); |
90 | 90 |
91 //! \brief Retrieves the IPC pipe name used to register with the Crashpad | |
92 //! handler. | |
93 //! | |
94 //! This method retrieves the IPC pipe name set by SetHandlerIPCPipe(), or a | |
95 //! suitable IPC pipe name chosen by StartHandler(). It is intended to be used | |
96 //! to obtain the IPC pipe name to pass it to other processes, so that they | |
97 //! may register with an existing Crashpad handler. | |
98 //! | |
99 //! This method is only defined on Windows. | |
100 //! | |
101 //! \return The full name of the crash handler IPC pipe, a string of the form | |
102 //! `"\\.\pipe\NAME"`. | |
103 std::wstring GetHandlerIPCPipe() const; | |
104 | |
91 //! \brief Requests that the handler capture a dump even though there hasn't | 105 //! \brief Requests that the handler capture a dump even though there hasn't |
92 //! been a crash. | 106 //! been a crash. |
93 //! | 107 //! |
94 //! \param[in] context A `CONTEXT`, generally captured by CaptureContext() or | 108 //! \param[in] context A `CONTEXT`, generally captured by CaptureContext() or |
95 //! similar. | 109 //! similar. |
96 static void DumpWithoutCrash(const CONTEXT& context); | 110 static void DumpWithoutCrash(const CONTEXT& context); |
97 #endif | 111 #endif |
98 | 112 |
99 //! \brief Configures the process to direct its crashes to a Crashpad handler. | 113 //! \brief Configures the process to direct its crashes to a Crashpad handler. |
100 //! | 114 //! |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 #elif defined(OS_WIN) | 161 #elif defined(OS_WIN) |
148 std::wstring ipc_pipe_; | 162 std::wstring ipc_pipe_; |
149 #endif | 163 #endif |
150 | 164 |
151 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); | 165 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); |
152 }; | 166 }; |
153 | 167 |
154 } // namespace crashpad | 168 } // namespace crashpad |
155 | 169 |
156 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ | 170 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ |
OLD | NEW |