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

Side by Side Diff: client/crash_report_database.h

Issue 904533002: Add CrashReportDatabase::ErrorWritingCrashReport() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | client/crash_report_database_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 //! be created or opened. 138 //! be created or opened.
139 //! 139 //!
140 //! \return A database object on success, `nullptr` on failure with an error 140 //! \return A database object on success, `nullptr` on failure with an error
141 //! logged. 141 //! logged.
142 static scoped_ptr<CrashReportDatabase> Initialize(const base::FilePath& path); 142 static scoped_ptr<CrashReportDatabase> Initialize(const base::FilePath& path);
143 143
144 //! \brief Creates a record of a new crash report. 144 //! \brief Creates a record of a new crash report.
145 //! 145 //!
146 //! Callers can then write the crash report using the file handle provided. 146 //! Callers can then write the crash report using the file handle provided.
147 //! The caller does not own this handle, and it must be explicitly closed with 147 //! The caller does not own this handle, and it must be explicitly closed with
148 //! FinishedWritingCrashReport(). 148 //! FinishedWritingCrashReport() or ErrorWritingCrashReport().
149 //! 149 //!
150 //! \param[out] report A file handle to which the crash report data should be 150 //! \param[out] report A file handle to which the crash report data should be
151 //! written. Only valid if this returns #kNoError. The caller must not 151 //! written. Only valid if this returns #kNoError. The caller must not
152 //! close this handle. 152 //! close this handle.
153 //! 153 //!
154 //! \return The operation status code. 154 //! \return The operation status code.
155 virtual OperationStatus PrepareNewCrashReport(NewReport** report) = 0; 155 virtual OperationStatus PrepareNewCrashReport(NewReport** report) = 0;
156 156
157 //! \brief Informs the database that a crash report has been written. 157 //! \brief Informs the database that a crash report has been written.
158 //! 158 //!
159 //! After calling this method, the database is permitted to move and rename 159 //! After calling this method, the database is permitted to move and rename
160 //! the file at Report::file_path. 160 //! the file at NewReport::path.
161 //! 161 //!
162 //! \param[in] report A handle obtained with PrepareNewCrashReport(). The 162 //! \param[in] report A handle obtained with PrepareNewCrashReport(). The
163 //! handle will be invalidated as part of this call. 163 //! handle will be invalidated as part of this call.
164 //! \param[out] uuid The UUID of this crash report. 164 //! \param[out] uuid The UUID of this crash report.
165 //! 165 //!
166 //! \return The operation status code. 166 //! \return The operation status code.
167 virtual OperationStatus FinishedWritingCrashReport(NewReport* report, 167 virtual OperationStatus FinishedWritingCrashReport(NewReport* report,
168 UUID* uuid) = 0; 168 UUID* uuid) = 0;
169 169
170 //! \brief Informs the database that an error occurred while attempting to
171 //! write a crash report, and that any resources associated with it should
172 //! be cleaned up.
173 //!
174 //! After calling this method, the database is permitted to remove the file at
175 //! NewReport::path.
176 //!
177 //! \param[in] report A handle obtained with PrepareNewCrashReport(). The
178 //! handle will be invalidated as part of this call.
179 //!
180 //! \return The operation status code.
181 virtual OperationStatus ErrorWritingCrashReport(NewReport* report) = 0;
182
170 //! \brief Returns the crash report record for the unique identifier. 183 //! \brief Returns the crash report record for the unique identifier.
171 //! 184 //!
172 //! \param[in] uuid The crash report record unique identifier. 185 //! \param[in] uuid The crash report record unique identifier.
173 //! \param[out] report A crash report record. Only valid if this returns 186 //! \param[out] report A crash report record. Only valid if this returns
174 //! #kNoError. 187 //! #kNoError.
175 //! 188 //!
176 //! \return The operation status code. 189 //! \return The operation status code.
177 virtual OperationStatus LookUpCrashReport(const UUID& uuid, 190 virtual OperationStatus LookUpCrashReport(const UUID& uuid,
178 Report* report) = 0; 191 Report* report) = 0;
179 192
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 protected: 259 protected:
247 CrashReportDatabase() {} 260 CrashReportDatabase() {}
248 261
249 private: 262 private:
250 DISALLOW_COPY_AND_ASSIGN(CrashReportDatabase); 263 DISALLOW_COPY_AND_ASSIGN(CrashReportDatabase);
251 }; 264 };
252 265
253 } // namespace crashpad 266 } // namespace crashpad
254 267
255 #endif // CRASHPAD_CLIENT_CRASH_REPORT_DATABASE_H_ 268 #endif // CRASHPAD_CLIENT_CRASH_REPORT_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | client/crash_report_database_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698