Chromium Code Reviews| 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..cbd81e341df6b1b19e9e82d95f8c9af73f6fe29d 100644 |
| --- a/content/child/indexed_db/indexed_db_dispatcher.cc |
| +++ b/content/child/indexed_db/indexed_db_dispatcher.cc |
| @@ -126,7 +126,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( |
| @@ -143,9 +143,8 @@ void IndexedDBDispatcher::RequestIDBCursorAdvance( |
| // 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::unique_ptr<WebIDBCallbacks>(callbacks_ptr)); |
| Send(new IndexedDBHostMsg_CursorAdvance( |
| ipc_cursor_id, CurrentWorkerId(), ipc_callbacks_id, count)); |
| } |
| @@ -159,9 +158,8 @@ void IndexedDBDispatcher::RequestIDBCursorContinue( |
| // 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::unique_ptr<WebIDBCallbacks>(callbacks_ptr)); |
| Send(new IndexedDBHostMsg_CursorContinue( |
| ipc_cursor_id, CurrentWorkerId(), ipc_callbacks_id, key, primary_key)); |
| } |
| @@ -170,9 +168,8 @@ void IndexedDBDispatcher::RequestIDBCursorPrefetch( |
| int n, |
| WebIDBCallbacks* callbacks_ptr, |
|
danakj
2016/11/18 00:15:33
and this?
|
| 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::unique_ptr<WebIDBCallbacks>(callbacks_ptr)); |
| Send(new IndexedDBHostMsg_CursorPrefetch( |
| ipc_cursor_id, CurrentWorkerId(), ipc_callbacks_id, n)); |
| } |