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

Side by Side Diff: content/browser/indexed_db/indexed_db_class_factory.cc

Issue 2760163002: [IndexedDB] Pool and evict leveldb iterators, to save memory (Closed)
Patch Set: comments Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/browser/indexed_db/indexed_db_class_factory.h" 5 #include "content/browser/indexed_db/indexed_db_class_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/browser/indexed_db/indexed_db_factory.h" 10 #include "content/browser/indexed_db/indexed_db_factory.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return std::unique_ptr<IndexedDBTransaction>(new IndexedDBTransaction( 47 return std::unique_ptr<IndexedDBTransaction>(new IndexedDBTransaction(
48 id, connection, scope, mode, backing_store_transaction)); 48 id, connection, scope, mode, backing_store_transaction));
49 } 49 }
50 50
51 scoped_refptr<LevelDBTransaction> 51 scoped_refptr<LevelDBTransaction>
52 IndexedDBClassFactory::CreateLevelDBTransaction(LevelDBDatabase* db) { 52 IndexedDBClassFactory::CreateLevelDBTransaction(LevelDBDatabase* db) {
53 return new LevelDBTransaction(db); 53 return new LevelDBTransaction(db);
54 } 54 }
55 55
56 std::unique_ptr<LevelDBIteratorImpl> IndexedDBClassFactory::CreateIteratorImpl( 56 std::unique_ptr<LevelDBIteratorImpl> IndexedDBClassFactory::CreateIteratorImpl(
57 std::unique_ptr<leveldb::Iterator> iterator) { 57 std::unique_ptr<leveldb::Iterator> iterator,
58 return base::WrapUnique(new LevelDBIteratorImpl(std::move(iterator))); 58 LevelDBDatabase* db,
59 const leveldb::Snapshot* snapshot) {
60 return base::WrapUnique(
61 new LevelDBIteratorImpl(std::move(iterator), db, snapshot));
59 } 62 }
60 63
61 } // namespace content 64 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698