OLD | NEW |
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 |
| 7 #include <utility> |
| 8 |
6 #include "content/browser/indexed_db/indexed_db_transaction.h" | 9 #include "content/browser/indexed_db/indexed_db_transaction.h" |
7 #include "content/browser/indexed_db/leveldb/leveldb_iterator_impl.h" | 10 #include "content/browser/indexed_db/leveldb/leveldb_iterator_impl.h" |
8 #include "content/browser/indexed_db/leveldb/leveldb_transaction.h" | 11 #include "content/browser/indexed_db/leveldb/leveldb_transaction.h" |
9 | 12 |
10 namespace content { | 13 namespace content { |
11 | 14 |
12 static IndexedDBClassFactory::GetterCallback* s_factory_getter; | 15 static IndexedDBClassFactory::GetterCallback* s_factory_getter; |
13 static ::base::LazyInstance<IndexedDBClassFactory>::Leaky s_factory = | 16 static ::base::LazyInstance<IndexedDBClassFactory>::Leaky s_factory = |
14 LAZY_INSTANCE_INITIALIZER; | 17 LAZY_INSTANCE_INITIALIZER; |
15 | 18 |
(...skipping 27 matching lines...) Expand all Loading... |
43 backing_store_transaction); | 46 backing_store_transaction); |
44 } | 47 } |
45 | 48 |
46 LevelDBTransaction* IndexedDBClassFactory::CreateLevelDBTransaction( | 49 LevelDBTransaction* IndexedDBClassFactory::CreateLevelDBTransaction( |
47 LevelDBDatabase* db) { | 50 LevelDBDatabase* db) { |
48 return new LevelDBTransaction(db); | 51 return new LevelDBTransaction(db); |
49 } | 52 } |
50 | 53 |
51 content::LevelDBIteratorImpl* IndexedDBClassFactory::CreateIteratorImpl( | 54 content::LevelDBIteratorImpl* IndexedDBClassFactory::CreateIteratorImpl( |
52 scoped_ptr<leveldb::Iterator> iterator) { | 55 scoped_ptr<leveldb::Iterator> iterator) { |
53 return new LevelDBIteratorImpl(iterator.Pass()); | 56 return new LevelDBIteratorImpl(std::move(iterator)); |
54 } | 57 } |
55 | 58 |
56 } // namespace content | 59 } // namespace content |
OLD | NEW |