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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 29 matching lines...) Expand all Loading... |
40 static IndexedDBClassFactory* Get(); | 40 static IndexedDBClassFactory* Get(); |
41 | 41 |
42 static void SetIndexedDBClassFactoryGetter(GetterCallback* cb); | 42 static void SetIndexedDBClassFactoryGetter(GetterCallback* cb); |
43 | 43 |
44 virtual scoped_refptr<IndexedDBDatabase> CreateIndexedDBDatabase( | 44 virtual scoped_refptr<IndexedDBDatabase> CreateIndexedDBDatabase( |
45 const base::string16& name, | 45 const base::string16& name, |
46 scoped_refptr<IndexedDBBackingStore> backing_store, | 46 scoped_refptr<IndexedDBBackingStore> backing_store, |
47 scoped_refptr<IndexedDBFactory> factory, | 47 scoped_refptr<IndexedDBFactory> factory, |
48 const IndexedDBDatabase::Identifier& unique_identifier); | 48 const IndexedDBDatabase::Identifier& unique_identifier); |
49 | 49 |
50 virtual IndexedDBTransaction* CreateIndexedDBTransaction( | 50 virtual std::unique_ptr<IndexedDBTransaction> CreateIndexedDBTransaction( |
51 int64_t id, | 51 int64_t id, |
52 base::WeakPtr<IndexedDBConnection> connection, | 52 IndexedDBConnection* connection, |
53 const std::set<int64_t>& scope, | 53 const std::set<int64_t>& scope, |
54 blink::WebIDBTransactionMode mode, | 54 blink::WebIDBTransactionMode mode, |
55 IndexedDBBackingStore::Transaction* backing_store_transaction); | 55 IndexedDBBackingStore::Transaction* backing_store_transaction); |
56 | 56 |
57 virtual std::unique_ptr<LevelDBIteratorImpl> CreateIteratorImpl( | 57 virtual std::unique_ptr<LevelDBIteratorImpl> CreateIteratorImpl( |
58 std::unique_ptr<leveldb::Iterator> iterator); | 58 std::unique_ptr<leveldb::Iterator> iterator); |
59 | 59 |
60 virtual scoped_refptr<LevelDBTransaction> CreateLevelDBTransaction( | 60 virtual scoped_refptr<LevelDBTransaction> CreateLevelDBTransaction( |
61 LevelDBDatabase* db); | 61 LevelDBDatabase* db); |
62 | 62 |
63 protected: | 63 protected: |
64 IndexedDBClassFactory() {} | 64 IndexedDBClassFactory() {} |
65 virtual ~IndexedDBClassFactory() {} | 65 virtual ~IndexedDBClassFactory() {} |
66 friend struct base::DefaultLazyInstanceTraits<IndexedDBClassFactory>; | 66 friend struct base::DefaultLazyInstanceTraits<IndexedDBClassFactory>; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace content | 69 } // namespace content |
70 | 70 |
71 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ | 71 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ |
OLD | NEW |