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

Side by Side Diff: trunk/src/content/browser/indexed_db/leveldb/leveldb_database.h

Issue 216433007: Revert 260147 "Handling LevelDB errors encountered after open." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium 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. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 leveldb::Status Put(const base::StringPiece& key, std::string* value); 80 leveldb::Status Put(const base::StringPiece& key, std::string* value);
81 leveldb::Status Remove(const base::StringPiece& key); 81 leveldb::Status Remove(const base::StringPiece& key);
82 virtual leveldb::Status Get(const base::StringPiece& key, 82 virtual leveldb::Status Get(const base::StringPiece& key,
83 std::string* value, 83 std::string* value,
84 bool* found, 84 bool* found,
85 const LevelDBSnapshot* = 0); 85 const LevelDBSnapshot* = 0);
86 leveldb::Status Write(const LevelDBWriteBatch& write_batch); 86 leveldb::Status Write(const LevelDBWriteBatch& write_batch);
87 scoped_ptr<LevelDBIterator> CreateIterator(const LevelDBSnapshot* = 0); 87 scoped_ptr<LevelDBIterator> CreateIterator(const LevelDBSnapshot* = 0);
88 const LevelDBComparator* Comparator() const; 88 const LevelDBComparator* Comparator() const;
89 void Compact(const base::StringPiece& start, const base::StringPiece& stop); 89 void Compact(const base::StringPiece& start, const base::StringPiece& stop);
90 void CompactAll();
91 90
92 protected: 91 protected:
93 LevelDBDatabase(); 92 LevelDBDatabase();
94 93
95 private: 94 private:
96 friend class LevelDBSnapshot; 95 friend class LevelDBSnapshot;
97 96
98 scoped_ptr<leveldb::Env> env_; 97 scoped_ptr<leveldb::Env> env_;
99 scoped_ptr<leveldb::Comparator> comparator_adapter_; 98 scoped_ptr<leveldb::Comparator> comparator_adapter_;
100 scoped_ptr<leveldb::DB> db_; 99 scoped_ptr<leveldb::DB> db_;
101 const LevelDBComparator* comparator_; 100 const LevelDBComparator* comparator_;
102 }; 101 };
103 102
104 } // namespace content 103 } // namespace content
105 104
106 #endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ 105 #endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698