| OLD | NEW | 
|---|
| 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 <memory> | 8 #include <memory> | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 129     } | 129     } | 
| 130     ~DetachIteratorOnDestruct(); | 130     ~DetachIteratorOnDestruct(); | 
| 131 | 131 | 
| 132    private: | 132    private: | 
| 133     LevelDBIterator* it_ = nullptr; | 133     LevelDBIterator* it_ = nullptr; | 
| 134 | 134 | 
| 135     DISALLOW_COPY_AND_ASSIGN(DetachIteratorOnDestruct); | 135     DISALLOW_COPY_AND_ASSIGN(DetachIteratorOnDestruct); | 
| 136   }; | 136   }; | 
| 137 | 137 | 
| 138   // Despite the type name, this object uses LRU eviction. | 138   // Despite the type name, this object uses LRU eviction. | 
| 139   size_t lru_max_size_ = 0; |  | 
| 140   base::HashingMRUCache<LevelDBIterator*, DetachIteratorOnDestruct> | 139   base::HashingMRUCache<LevelDBIterator*, DetachIteratorOnDestruct> | 
| 141       iterator_lru_; | 140       iterator_lru_; | 
| 142 | 141 | 
| 143   // Recorded for UMA reporting. | 142   // Recorded for UMA reporting. | 
| 144   uint32_t num_iterators_ = 0; | 143   uint32_t num_iterators_ = 0; | 
| 145   uint32_t max_iterators_ = 0; | 144   uint32_t max_iterators_ = 0; | 
| 146 | 145 | 
| 147   std::string file_name_for_tracing; | 146   std::string file_name_for_tracing; | 
| 148 }; | 147 }; | 
| 149 | 148 | 
| 150 }  // namespace content | 149 }  // namespace content | 
| 151 | 150 | 
| 152 #endif  // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ | 151 #endif  // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ | 
| OLD | NEW | 
|---|