[email protected] | 0d04ede | 2012-10-18 04:31:53 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef SQL_ERROR_DELEGATE_UTIL_H_ |
| 6 | #define SQL_ERROR_DELEGATE_UTIL_H_ |
| 7 | |
afakhry | 7c9abe7 | 2016-08-05 17:33:19 | [diff] [blame] | 8 | #include <string> |
| 9 | |
| 10 | #include "base/files/file_path.h" |
[email protected] | 0d04ede | 2012-10-18 04:31:53 | [diff] [blame] | 11 | #include "sql/sql_export.h" |
| 12 | |
| 13 | namespace sql { |
| 14 | |
| 15 | // Returns true if it is highly unlikely that the database can recover from |
| 16 | // |error|. |
| 17 | SQL_EXPORT bool IsErrorCatastrophic(int error); |
| 18 | |
afakhry | 7c9abe7 | 2016-08-05 17:33:19 | [diff] [blame] | 19 | // Gets diagnostic info of the given |corrupted_file_path| that can be appended |
| 20 | // to a corrupt database diagnostics info. The file info are not localized as |
| 21 | // it's meant to be added to feedback reports and used by developers. |
| 22 | // Also the full file path is not appended as it might contain some PII. Instead |
| 23 | // only the last two components of the path are appended to distinguish between |
| 24 | // default and user profiles. |
| 25 | SQL_EXPORT std::string GetCorruptFileDiagnosticsInfo( |
| 26 | const base::FilePath& corrupted_file_path); |
| 27 | |
[email protected] | 0d04ede | 2012-10-18 04:31:53 | [diff] [blame] | 28 | } // namespace sql |
| 29 | |
| 30 | #endif // SQL_ERROR_DELEGATE_UTIL_H_ |