| OLD | NEW |
| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 //! \brief An error occured while performing a file operation on a crash | 113 //! \brief An error occured while performing a file operation on a crash |
| 114 //! report. | 114 //! report. |
| 115 //! | 115 //! |
| 116 //! A database is responsible for managing both the metadata about a report | 116 //! A database is responsible for managing both the metadata about a report |
| 117 //! and the actual crash report itself. This error is returned when an | 117 //! and the actual crash report itself. This error is returned when an |
| 118 //! error occurred when managing the report file. Additional information | 118 //! error occurred when managing the report file. Additional information |
| 119 //! will be logged. | 119 //! will be logged. |
| 120 kFileSystemError, | 120 kFileSystemError, |
| 121 | 121 |
| 122 //! \brief An error occured while recording metadata for a crash report. | 122 //! \brief An error occured while recording metadata for a crash report or |
| 123 //! database-wide settings. |
| 123 //! | 124 //! |
| 124 //! A database is responsible for managing both the metadata about a report | 125 //! A database is responsible for managing both the metadata about a report |
| 125 //! and the actual crash report itself. This error is returned when an | 126 //! and the actual crash report itself. This error is returned when an |
| 126 //! error occurred when managing the metadata about a crash report. | 127 //! error occurred when managing the metadata about a crash report or |
| 127 //! Additional information will be logged. | 128 //! database-wide settings. Additional information will be logged. |
| 128 kDatabaseError, | 129 kDatabaseError, |
| 129 | 130 |
| 130 //! \brief The operation could not be completed because a concurrent | 131 //! \brief The operation could not be completed because a concurrent |
| 131 //! operation affecting the report is occurring. | 132 //! operation affecting the report is occurring. |
| 132 kBusyError, | 133 kBusyError, |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 virtual ~CrashReportDatabase() {} | 136 virtual ~CrashReportDatabase() {} |
| 136 | 137 |
| 137 //! \brief Initializes a database of crash reports. | 138 //! \brief Initializes a database of crash reports. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 //! \param[in] uuid The unique identifier for the crash report record. | 228 //! \param[in] uuid The unique identifier for the crash report record. |
| 228 //! \param[out] report A crash report record for the report to be uploaded. | 229 //! \param[out] report A crash report record for the report to be uploaded. |
| 229 //! The caller does not own this object. Only valid if this returns | 230 //! The caller does not own this object. Only valid if this returns |
| 230 //! #kNoError. | 231 //! #kNoError. |
| 231 //! | 232 //! |
| 232 //! \return The operation status code. | 233 //! \return The operation status code. |
| 233 virtual OperationStatus GetReportForUploading(const UUID& uuid, | 234 virtual OperationStatus GetReportForUploading(const UUID& uuid, |
| 234 const Report** report) = 0; | 235 const Report** report) = 0; |
| 235 | 236 |
| 236 //! \brief Adjusts a crash report record’s metadata to account for an upload | 237 //! \brief Adjusts a crash report record’s metadata to account for an upload |
| 237 //! attempt. | 238 //! attempt, and updates the last upload attempt time as returned by |
| 239 //! Settings::GetLastUploadAttemptTime(). |
| 238 //! | 240 //! |
| 239 //! After calling this method, the database is permitted to move and rename | 241 //! After calling this method, the database is permitted to move and rename |
| 240 //! the file at Report::file_path. | 242 //! the file at Report::file_path. |
| 241 //! | 243 //! |
| 242 //! \param[in] report The report object obtained from | 244 //! \param[in] report The report object obtained from |
| 243 //! GetReportForUploading(). This object is invalidated after this call. | 245 //! GetReportForUploading(). This object is invalidated after this call. |
| 244 //! \param[in] successful Whether the upload attempt was successful. | 246 //! \param[in] successful Whether the upload attempt was successful. |
| 245 //! \param[in] id The identifier assigned to this crash report by the | 247 //! \param[in] id The identifier assigned to this crash report by the |
| 246 //! collection server. Must be empty if \a successful is `false`; may be | 248 //! collection server. Must be empty if \a successful is `false`; may be |
| 247 //! empty if it is `true`. | 249 //! empty if it is `true`. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 265 protected: | 267 protected: |
| 266 CrashReportDatabase() {} | 268 CrashReportDatabase() {} |
| 267 | 269 |
| 268 private: | 270 private: |
| 269 DISALLOW_COPY_AND_ASSIGN(CrashReportDatabase); | 271 DISALLOW_COPY_AND_ASSIGN(CrashReportDatabase); |
| 270 }; | 272 }; |
| 271 | 273 |
| 272 } // namespace crashpad | 274 } // namespace crashpad |
| 273 | 275 |
| 274 #endif // CRASHPAD_CLIENT_CRASH_REPORT_DATABASE_H_ | 276 #endif // CRASHPAD_CLIENT_CRASH_REPORT_DATABASE_H_ |
| OLD | NEW |