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

Side by Side Diff: third_party/leveldatabase/env_chromium.h

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: Change to IsIOError 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The LevelDB Authors. All rights reserved. 1 // Copyright (c) 2013 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors. 3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 4
5 #ifndef THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_ 5 #ifndef THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_
6 #define THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_ 6 #define THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 METHOD_ONLY, 59 METHOD_ONLY,
60 METHOD_AND_PFE, 60 METHOD_AND_PFE,
61 METHOD_AND_ERRNO, 61 METHOD_AND_ERRNO,
62 NONE, 62 NONE,
63 }; 63 };
64 64
65 ErrorParsingResult ParseMethodAndError(const char* string, 65 ErrorParsingResult ParseMethodAndError(const char* string,
66 MethodID* method, 66 MethodID* method,
67 int* error); 67 int* error);
68 bool IndicatesDiskFull(leveldb::Status status); 68 bool IndicatesDiskFull(leveldb::Status status);
69 bool IsIOError(leveldb::Status status);
69 std::string FilePathToString(const base::FilePath& file_path); 70 std::string FilePathToString(const base::FilePath& file_path);
70 71
71 class UMALogger { 72 class UMALogger {
72 public: 73 public:
73 virtual void RecordErrorAt(MethodID method) const = 0; 74 virtual void RecordErrorAt(MethodID method) const = 0;
74 virtual void RecordOSError(MethodID method, int saved_errno) const = 0; 75 virtual void RecordOSError(MethodID method, int saved_errno) const = 0;
75 virtual void RecordOSError(MethodID method, 76 virtual void RecordOSError(MethodID method,
76 base::PlatformFileError error) const = 0; 77 base::PlatformFileError error) const = 0;
77 }; 78 };
78 79
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void* arg; 196 void* arg;
196 void (*function)(void*); 197 void (*function)(void*);
197 }; 198 };
198 typedef std::deque<BGItem> BGQueue; 199 typedef std::deque<BGItem> BGQueue;
199 BGQueue queue_; 200 BGQueue queue_;
200 }; 201 };
201 202
202 } // namespace leveldb_env 203 } // namespace leveldb_env
203 204
204 #endif 205 #endif
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc ('k') | third_party/leveldatabase/env_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698