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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 //! | 121 //! |
122 //! \return `true` on success, `false` on failure with a message logged. | 122 //! \return `true` on success, `false` on failure with a message logged. |
123 bool UseHandler(); | 123 bool UseHandler(); |
124 | 124 |
125 #if defined(OS_MACOSX) || DOXYGEN | 125 #if defined(OS_MACOSX) || DOXYGEN |
126 //! \brief Configures the process to direct its crashes to the default handler | 126 //! \brief Configures the process to direct its crashes to the default handler |
127 //! for the operating system. | 127 //! for the operating system. |
128 //! | 128 //! |
129 //! On OS X, this sets the task’s exception port as in UseHandler(), but the | 129 //! On OS X, this sets the task’s exception port as in UseHandler(), but the |
130 //! exception handler used is obtained from SystemCrashReporterHandler(). If | 130 //! exception handler used is obtained from SystemCrashReporterHandler(). If |
131 //! the system’s crash reporter handler cannot be determined, the task’s | 131 //! the system’s crash reporter handler cannot be determined or set, the |
132 //! exception ports for crash-type exceptions are cleared. | 132 //! task’s exception ports for crash-type exceptions are cleared. |
133 //! | 133 //! |
134 //! Use of this function is strongly discouraged. | 134 //! Use of this function is strongly discouraged. |
135 //! | 135 //! |
136 //! \warning After a successful call to this function, Crashpad will no longer | 136 //! \warning After a call to this function, Crashpad will no longer monitor |
137 //! monitor the process for crashes until a subsequent call to | 137 //! the process for crashes until a subsequent call to UseHandler(). |
138 //! UseHandler(). | |
139 //! | 138 //! |
140 //! \note This is provided as a static function to allow it to be used in | 139 //! \note This is provided as a static function to allow it to be used in |
141 //! situations where a CrashpadClient object is not otherwise available. | 140 //! situations where a CrashpadClient object is not otherwise available. |
142 //! This may be useful when a child process inherits its parent’s Crashpad | 141 //! This may be useful when a child process inherits its parent’s Crashpad |
143 //! handler, but wants to sever this tie. | 142 //! handler, but wants to sever this tie. |
144 //! | 143 static void UseSystemDefaultHandler(); |
145 //! \return `true` on success, `false` on failure with a message logged. | |
146 static bool UseSystemDefaultHandler(); | |
147 #endif | 144 #endif |
148 | 145 |
149 private: | 146 private: |
150 #if defined(OS_MACOSX) | 147 #if defined(OS_MACOSX) |
151 base::mac::ScopedMachSendRight exception_port_; | 148 base::mac::ScopedMachSendRight exception_port_; |
152 #endif | 149 #endif |
153 | 150 |
154 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); | 151 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); |
155 }; | 152 }; |
156 | 153 |
157 } // namespace crashpad | 154 } // namespace crashpad |
158 | 155 |
159 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ | 156 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ |
OLD | NEW |