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

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

Issue 862723002: leveldb: Moved to LevelDBEnv.IOError.BFE histogram entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on ToT (to very pretty histograms.xml) - no changes. Created 5 years, 9 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
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 <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 leveldb::Status MakeIOError(leveldb::Slice filename, 52 leveldb::Status MakeIOError(leveldb::Slice filename,
53 const std::string& message, 53 const std::string& message,
54 MethodID method, 54 MethodID method,
55 base::File::Error error); 55 base::File::Error error);
56 leveldb::Status MakeIOError(leveldb::Slice filename, 56 leveldb::Status MakeIOError(leveldb::Slice filename,
57 const std::string& message, 57 const std::string& message,
58 MethodID method); 58 MethodID method);
59 59
60 enum ErrorParsingResult { 60 enum ErrorParsingResult {
61 METHOD_ONLY, 61 METHOD_ONLY,
62 METHOD_AND_PFE, 62 METHOD_AND_BFE,
63 NONE, 63 NONE,
64 }; 64 };
65 65
66 ErrorParsingResult ParseMethodAndError(const leveldb::Status& status, 66 ErrorParsingResult ParseMethodAndError(const leveldb::Status& status,
67 MethodID* method, 67 MethodID* method,
68 base::File::Error* error); 68 base::File::Error* error);
69 int GetCorruptionCode(const leveldb::Status& status); 69 int GetCorruptionCode(const leveldb::Status& status);
70 int GetNumCorruptionCodes(); 70 int GetNumCorruptionCodes();
71 std::string GetCorruptionMessage(const leveldb::Status& status); 71 std::string GetCorruptionMessage(const leveldb::Status& status);
72 bool IndicatesDiskFull(const leveldb::Status& status); 72 bool IndicatesDiskFull(const leveldb::Status& status);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 leveldb::RandomAccessFile** result); 122 leveldb::RandomAccessFile** result);
123 virtual leveldb::Status NewWritableFile(const std::string& fname, 123 virtual leveldb::Status NewWritableFile(const std::string& fname,
124 leveldb::WritableFile** result); 124 leveldb::WritableFile** result);
125 virtual leveldb::Status NewAppendableFile(const std::string& fname, 125 virtual leveldb::Status NewAppendableFile(const std::string& fname,
126 leveldb::WritableFile** result); 126 leveldb::WritableFile** result);
127 virtual leveldb::Status NewLogger(const std::string& fname, 127 virtual leveldb::Status NewLogger(const std::string& fname,
128 leveldb::Logger** result); 128 leveldb::Logger** result);
129 129
130 protected: 130 protected:
131 std::string name_; 131 std::string name_;
132 std::string uma_ioerror_base_name_;
132 bool make_backup_; 133 bool make_backup_;
133 134
134 private: 135 private:
135 static const char* FileErrorString(base::File::Error error); 136 static const char* FileErrorString(base::File::Error error);
136 137
137 virtual void RecordErrorAt(MethodID method) const; 138 virtual void RecordErrorAt(MethodID method) const;
138 virtual void RecordOSError(MethodID method, 139 virtual void RecordOSError(MethodID method,
139 base::File::Error error) const; 140 base::File::Error error) const;
140 void RecordOpenFilesLimit(const std::string& type); 141 void RecordOpenFilesLimit(const std::string& type);
141 base::HistogramBase* GetMaxFDHistogram(const std::string& type) const; 142 base::HistogramBase* GetMaxFDHistogram(const std::string& type) const;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void (*function)(void*); 192 void (*function)(void*);
192 }; 193 };
193 typedef std::deque<BGItem> BGQueue; 194 typedef std::deque<BGItem> BGQueue;
194 BGQueue queue_; 195 BGQueue queue_;
195 LockTable locks_; 196 LockTable locks_;
196 }; 197 };
197 198
198 } // namespace leveldb_env 199 } // namespace leveldb_env
199 200
200 #endif // THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_ 201 #endif // THIRD_PARTY_LEVELDATABASE_ENV_CHROMIUM_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/leveldb/leveldb_database.cc ('k') | third_party/leveldatabase/env_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698