| Index: content/browser/indexed_db/indexed_db_callbacks.cc
|
| diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
|
| index eb639072bfc5c21cde8db2f750a2e322605bb14b..96cb66d3e84ce369a2c5abb67202bdf83a8ff91e 100644
|
| --- a/content/browser/indexed_db/indexed_db_callbacks.cc
|
| +++ b/content/browser/indexed_db/indexed_db_callbacks.cc
|
| @@ -21,6 +21,7 @@
|
| #include "content/browser/indexed_db/indexed_db_database_error.h"
|
| #include "content/browser/indexed_db/indexed_db_return_value.h"
|
| #include "content/browser/indexed_db/indexed_db_tracing.h"
|
| +#include "content/browser/indexed_db/indexed_db_transaction.h"
|
| #include "content/browser/indexed_db/indexed_db_value.h"
|
| #include "content/common/indexed_db/indexed_db_constants.h"
|
| #include "content/common/indexed_db/indexed_db_messages.h"
|
| @@ -174,6 +175,7 @@ void IndexedDBCallbacks::OnBlocked(int64_t existing_version) {
|
| void IndexedDBCallbacks::OnUpgradeNeeded(
|
| int64_t old_version,
|
| std::unique_ptr<IndexedDBConnection> connection,
|
| + IndexedDBTransaction* transaction,
|
| const IndexedDBDatabaseMetadata& metadata,
|
| const IndexedDBDataLossInfo& data_loss_info) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| @@ -184,9 +186,8 @@ void IndexedDBCallbacks::OnUpgradeNeeded(
|
| DCHECK_EQ(kNoDatabase, ipc_database_id_);
|
|
|
| data_loss_ = data_loss_info.status;
|
| - dispatcher_host_->RegisterTransactionId(host_transaction_id_, origin_);
|
| int32_t ipc_database_id =
|
| - dispatcher_host_->Add(connection.release(), origin_);
|
| + dispatcher_host_->Add(std::move(connection), origin_);
|
| if (ipc_database_id < 0)
|
| return;
|
|
|
| @@ -222,7 +223,7 @@ void IndexedDBCallbacks::OnSuccess(
|
| int32_t ipc_object_id = kNoDatabase;
|
| // Only register if the connection was not previously sent in OnUpgradeNeeded.
|
| if (ipc_database_id_ == kNoDatabase) {
|
| - ipc_object_id = dispatcher_host_->Add(connection.release(), origin_);
|
| + ipc_object_id = dispatcher_host_->Add(std::move(connection), origin_);
|
| }
|
|
|
| BrowserThread::PostTask(
|
| @@ -354,7 +355,7 @@ void IndexedDBCallbacks::RegisterBlobsAndSend(
|
| BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback);
|
| }
|
|
|
| -void IndexedDBCallbacks::OnSuccess(scoped_refptr<IndexedDBCursor> cursor,
|
| +void IndexedDBCallbacks::OnSuccess(std::unique_ptr<IndexedDBCursor> cursor,
|
| const IndexedDBKey& key,
|
| const IndexedDBKey& primary_key,
|
| IndexedDBValue* value) {
|
| @@ -367,7 +368,7 @@ void IndexedDBCallbacks::OnSuccess(scoped_refptr<IndexedDBCursor> cursor,
|
| DCHECK_EQ(kNoDatabase, ipc_database_id_);
|
| DCHECK_EQ(blink::WebIDBDataLossNone, data_loss_);
|
|
|
| - int32_t ipc_object_id = dispatcher_host_->Add(cursor.get());
|
| + int32_t ipc_object_id = dispatcher_host_->Add(std::move(cursor));
|
| std::unique_ptr<IndexedDBMsg_CallbacksSuccessIDBCursor_Params> params(
|
| new IndexedDBMsg_CallbacksSuccessIDBCursor_Params());
|
| params->ipc_thread_id = ipc_thread_id_;
|
|
|