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

Unified Diff: third_party/leveldatabase/env_chromium.cc

Issue 26045002: Don't reset the database when there was an I/O error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mark enum as deprecated Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/leveldatabase/env_chromium.cc
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 9cba7291eac71d70ead072711ad6e3c137fb1cec..0267a3137ab3ea49428b9340e0150895de0a23a3 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -392,6 +392,14 @@ bool IndicatesDiskFull(leveldb::Status status) {
(result == leveldb_env::METHOD_AND_ERRNO && error == ENOSPC);
}
+bool RecoveryCouldBeFruitful(leveldb::Status status) {
jsbell 2013/10/04 23:32:33 Could this be renamed now to StatusIsIOError or so
dgrogan 2013/10/05 01:06:16 Done.
+ leveldb_env::MethodID method;
+ int error = -1;
+ leveldb_env::ErrorParsingResult result = leveldb_env::ParseMethodAndError(
+ status.ToString().c_str(), &method, &error);
+ return result == leveldb_env::NONE;
+}
+
std::string FilePathToString(const base::FilePath& file_path) {
#if defined(OS_WIN)
return UTF16ToUTF8(file_path.value());

Powered by Google App Engine
This is Rietveld 408576698