| Index: content/child/indexed_db/indexed_db_dispatcher.cc
|
| diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc
|
| index aafd24419d65f749c47d08f81e01134920406d48..6679d0897518866eddaaf646b8bcf07f79247380 100644
|
| --- a/content/child/indexed_db/indexed_db_dispatcher.cc
|
| +++ b/content/child/indexed_db/indexed_db_dispatcher.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "content/child/indexed_db/indexed_db_dispatcher.h"
|
|
|
| +#include <memory>
|
| #include <utility>
|
|
|
| #include "base/format_macros.h"
|
| @@ -126,7 +127,7 @@ bool IndexedDBDispatcher::Send(IPC::Message* msg) {
|
|
|
| int32_t IndexedDBDispatcher::RegisterObserver(
|
| std::unique_ptr<WebIDBObserver> observer) {
|
| - return observers_.Add(observer.release());
|
| + return observers_.Add(std::move(observer));
|
| }
|
|
|
| void IndexedDBDispatcher::RemoveObservers(
|
| @@ -137,15 +138,13 @@ void IndexedDBDispatcher::RemoveObservers(
|
|
|
| void IndexedDBDispatcher::RequestIDBCursorAdvance(
|
| unsigned long count,
|
| - WebIDBCallbacks* callbacks_ptr,
|
| + std::unique_ptr<WebIDBCallbacks> callbacks_ptr,
|
| int32_t ipc_cursor_id,
|
| int64_t transaction_id) {
|
| // Reset all cursor prefetch caches except for this cursor.
|
| ResetCursorPrefetchCaches(transaction_id, ipc_cursor_id);
|
|
|
| - std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
|
| -
|
| - int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
|
| + int32_t ipc_callbacks_id = pending_callbacks_.Add(std::move(callbacks_ptr));
|
| Send(new IndexedDBHostMsg_CursorAdvance(
|
| ipc_cursor_id, CurrentWorkerId(), ipc_callbacks_id, count));
|
| }
|
| @@ -153,26 +152,22 @@ void IndexedDBDispatcher::RequestIDBCursorAdvance(
|
| void IndexedDBDispatcher::RequestIDBCursorContinue(
|
| const IndexedDBKey& key,
|
| const IndexedDBKey& primary_key,
|
| - WebIDBCallbacks* callbacks_ptr,
|
| + std::unique_ptr<WebIDBCallbacks> callbacks_ptr,
|
| int32_t ipc_cursor_id,
|
| int64_t transaction_id) {
|
| // Reset all cursor prefetch caches except for this cursor.
|
| ResetCursorPrefetchCaches(transaction_id, ipc_cursor_id);
|
|
|
| - std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
|
| -
|
| - int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
|
| + int32_t ipc_callbacks_id = pending_callbacks_.Add(std::move(callbacks_ptr));
|
| Send(new IndexedDBHostMsg_CursorContinue(
|
| ipc_cursor_id, CurrentWorkerId(), ipc_callbacks_id, key, primary_key));
|
| }
|
|
|
| void IndexedDBDispatcher::RequestIDBCursorPrefetch(
|
| int n,
|
| - WebIDBCallbacks* callbacks_ptr,
|
| + std::unique_ptr<WebIDBCallbacks> callbacks_ptr,
|
| int32_t ipc_cursor_id) {
|
| - std::unique_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
|
| -
|
| - int32_t ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
|
| + int32_t ipc_callbacks_id = pending_callbacks_.Add(std::move(callbacks_ptr));
|
| Send(new IndexedDBHostMsg_CursorPrefetch(
|
| ipc_cursor_id, CurrentWorkerId(), ipc_callbacks_id, n));
|
| }
|
|
|