| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |