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

Unified Diff: content/browser/indexed_db/indexed_db_class_factory.cc

Issue 2472213003: [IndexedDB] Refactoring to remove ref ptrs and host transaction ids. (Closed)
Patch Set: comments Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_class_factory.cc
diff --git a/content/browser/indexed_db/indexed_db_class_factory.cc b/content/browser/indexed_db/indexed_db_class_factory.cc
index 2ef35d673e381045b1fa1fa3d29ad915918e9838..c6e2489ed1f802f4cc9d9f2b6ade7e87dd4ef2c7 100644
--- a/content/browser/indexed_db/indexed_db_class_factory.cc
+++ b/content/browser/indexed_db/indexed_db_class_factory.cc
@@ -37,17 +37,15 @@ scoped_refptr<IndexedDBDatabase> IndexedDBClassFactory::CreateIndexedDBDatabase(
return new IndexedDBDatabase(name, backing_store, factory, unique_identifier);
}
-IndexedDBTransaction* IndexedDBClassFactory::CreateIndexedDBTransaction(
+std::unique_ptr<IndexedDBTransaction>
+IndexedDBClassFactory::CreateIndexedDBTransaction(
int64_t id,
- base::WeakPtr<IndexedDBConnection> connection,
+ IndexedDBConnection* connection,
const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBBackingStore::Transaction* backing_store_transaction) {
- // The transaction adds itself to |connection|'s database's transaction
- // coordinator, which owns the object.
- IndexedDBTransaction* transaction = new IndexedDBTransaction(
- id, std::move(connection), scope, mode, backing_store_transaction);
- return transaction;
+ return std::unique_ptr<IndexedDBTransaction>(new IndexedDBTransaction(
+ id, connection, scope, mode, backing_store_transaction));
}
scoped_refptr<LevelDBTransaction>

Powered by Google App Engine
This is Rietveld 408576698