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

Unified Diff: content/browser/indexed_db/mock_browsertest_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/mock_browsertest_indexed_db_class_factory.cc
diff --git a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
index 2ba375f9c2adfdef7c4b667e16461901e100e9c9..c4084948abb6940da102d48df4b622370e5b7bb6 100644
--- a/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
+++ b/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc
@@ -66,12 +66,12 @@ class IndexedDBTestTransaction : public IndexedDBTransaction {
public:
IndexedDBTestTransaction(
int64_t id,
- base::WeakPtr<IndexedDBConnection> connection,
+ IndexedDBConnection* connection,
const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBBackingStore::Transaction* backing_store_transaction)
: IndexedDBTransaction(id,
- std::move(connection),
+ connection,
scope,
mode,
backing_store_transaction) {}
@@ -264,15 +264,15 @@ MockBrowserTestIndexedDBClassFactory::CreateIndexedDBDatabase(
unique_identifier);
}
-IndexedDBTransaction*
+std::unique_ptr<IndexedDBTransaction>
MockBrowserTestIndexedDBClassFactory::CreateIndexedDBTransaction(
int64_t id,
- base::WeakPtr<IndexedDBConnection> connection,
+ IndexedDBConnection* connection,
const std::set<int64_t>& scope,
blink::WebIDBTransactionMode mode,
IndexedDBBackingStore::Transaction* backing_store_transaction) {
- return new IndexedDBTestTransaction(id, std::move(connection), scope, mode,
- backing_store_transaction);
+ return std::unique_ptr<IndexedDBTransaction>(new IndexedDBTestTransaction(
+ id, connection, scope, mode, backing_store_transaction));
}
scoped_refptr<LevelDBTransaction>

Powered by Google App Engine
This is Rietveld 408576698