Chromium Code Reviews| 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> |
| 11 #include <set> | 11 #include <set> |
| 12 | 12 |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 14 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 15 #include "content/browser/indexed_db/indexed_db_connection.h" | |
| 15 #include "content/browser/indexed_db/indexed_db_database.h" | 16 #include "content/browser/indexed_db/indexed_db_database.h" |
| 16 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 17 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" | 18 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" |
| 18 | 19 |
| 19 namespace leveldb { | 20 namespace leveldb { |
| 20 class Iterator; | 21 class Iterator; |
| 21 } // namespace leveldb | 22 } // namespace leveldb |
| 22 | 23 |
| 23 namespace content { | 24 namespace content { |
| 24 | 25 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 41 static void SetIndexedDBClassFactoryGetter(GetterCallback* cb); | 42 static void SetIndexedDBClassFactoryGetter(GetterCallback* cb); |
| 42 | 43 |
| 43 virtual IndexedDBDatabase* CreateIndexedDBDatabase( | 44 virtual IndexedDBDatabase* CreateIndexedDBDatabase( |
| 44 const base::string16& name, | 45 const base::string16& name, |
| 45 IndexedDBBackingStore* backing_store, | 46 IndexedDBBackingStore* backing_store, |
| 46 IndexedDBFactory* factory, | 47 IndexedDBFactory* factory, |
| 47 const IndexedDBDatabase::Identifier& unique_identifier); | 48 const IndexedDBDatabase::Identifier& unique_identifier); |
| 48 | 49 |
| 49 virtual IndexedDBTransaction* CreateIndexedDBTransaction( | 50 virtual IndexedDBTransaction* CreateIndexedDBTransaction( |
| 50 int64_t id, | 51 int64_t id, |
| 52 IndexedDBConnection* connection, | |
|
dmurph
2016/06/22 01:09:48
base::WeakPtr<IndexedDBConnection>
here and below
palakj1
2016/06/23 20:56:29
Done
| |
| 51 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks, | 53 scoped_refptr<IndexedDBDatabaseCallbacks> callbacks, |
| 52 const std::set<int64_t>& scope, | 54 const std::set<int64_t>& scope, |
| 53 blink::WebIDBTransactionMode mode, | 55 blink::WebIDBTransactionMode mode, |
| 54 IndexedDBDatabase* db, | 56 IndexedDBDatabase* db, |
| 55 IndexedDBBackingStore::Transaction* backing_store_transaction); | 57 IndexedDBBackingStore::Transaction* backing_store_transaction); |
| 56 | 58 |
| 57 virtual LevelDBIteratorImpl* CreateIteratorImpl( | 59 virtual LevelDBIteratorImpl* CreateIteratorImpl( |
| 58 std::unique_ptr<leveldb::Iterator> iterator); | 60 std::unique_ptr<leveldb::Iterator> iterator); |
| 59 virtual LevelDBTransaction* CreateLevelDBTransaction(LevelDBDatabase* db); | 61 virtual LevelDBTransaction* CreateLevelDBTransaction(LevelDBDatabase* db); |
| 60 | 62 |
| 61 protected: | 63 protected: |
| 62 IndexedDBClassFactory() {} | 64 IndexedDBClassFactory() {} |
| 63 virtual ~IndexedDBClassFactory() {} | 65 virtual ~IndexedDBClassFactory() {} |
| 64 friend struct base::DefaultLazyInstanceTraits<IndexedDBClassFactory>; | 66 friend struct base::DefaultLazyInstanceTraits<IndexedDBClassFactory>; |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 } // namespace content | 69 } // namespace content |
| 68 | 70 |
| 69 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ | 71 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CLASS_FACTORY_H_ |
| OLD | NEW |