| Index: content/child/indexed_db/indexed_db_dispatcher.h
|
| diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h
|
| index 3d75d37bc6dc1ba54beb815020c0774b9306c01e..241530b064336756324869d1ff59f513276b9e56 100644
|
| --- a/content/child/indexed_db/indexed_db_dispatcher.h
|
| +++ b/content/child/indexed_db/indexed_db_dispatcher.h
|
| @@ -9,7 +9,9 @@
|
| #include <stdint.h>
|
|
|
| #include <map>
|
| +#include <memory>
|
| #include <string>
|
| +#include <utility>
|
| #include <vector>
|
|
|
| #include "base/gtest_prod_util.h"
|
| @@ -82,22 +84,25 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
|
| void RemoveObservers(const std::vector<int32_t>& observer_ids_to_remove);
|
|
|
| // This method is virtual so it can be overridden in unit tests.
|
| - virtual void RequestIDBCursorAdvance(unsigned long count,
|
| - blink::WebIDBCallbacks* callbacks_ptr,
|
| - int32_t ipc_cursor_id,
|
| - int64_t transaction_id);
|
| + virtual void RequestIDBCursorAdvance(
|
| + unsigned long count,
|
| + std::unique_ptr<blink::WebIDBCallbacks> callbacks_ptr,
|
| + int32_t ipc_cursor_id,
|
| + int64_t transaction_id);
|
|
|
| // This method is virtual so it can be overridden in unit tests.
|
| - virtual void RequestIDBCursorContinue(const IndexedDBKey& key,
|
| - const IndexedDBKey& primary_key,
|
| - blink::WebIDBCallbacks* callbacks_ptr,
|
| - int32_t ipc_cursor_id,
|
| - int64_t transaction_id);
|
| + virtual void RequestIDBCursorContinue(
|
| + const IndexedDBKey& key,
|
| + const IndexedDBKey& primary_key,
|
| + std::unique_ptr<blink::WebIDBCallbacks> callbacks_ptr,
|
| + int32_t ipc_cursor_id,
|
| + int64_t transaction_id);
|
|
|
| // This method is virtual so it can be overridden in unit tests.
|
| - virtual void RequestIDBCursorPrefetch(int n,
|
| - blink::WebIDBCallbacks* callbacks_ptr,
|
| - int32_t ipc_cursor_id);
|
| + virtual void RequestIDBCursorPrefetch(
|
| + int n,
|
| + std::unique_ptr<blink::WebIDBCallbacks> callbacks_ptr,
|
| + int32_t ipc_cursor_id);
|
|
|
| // This method is virtual so it can be overridden in unit tests.
|
| virtual void RequestIDBCursorPrefetchReset(int used_prefetches,
|
| @@ -130,10 +135,10 @@ class CONTENT_EXPORT IndexedDBDispatcher : public WorkerThread::Observer {
|
| static int32_t CurrentWorkerId() { return WorkerThread::GetCurrentId(); }
|
|
|
| template <typename T>
|
| - void init_params(T* params, blink::WebIDBCallbacks* callbacks_ptr) {
|
| - std::unique_ptr<blink::WebIDBCallbacks> callbacks(callbacks_ptr);
|
| + void init_params(T* params,
|
| + std::unique_ptr<blink::WebIDBCallbacks> callbacks_ptr) {
|
| params->ipc_thread_id = CurrentWorkerId();
|
| - params->ipc_callbacks_id = pending_callbacks_.Add(callbacks.release());
|
| + params->ipc_callbacks_id = pending_callbacks_.Add(std::move(callbacks_ptr));
|
| }
|
|
|
| // IDBCallback message handlers.
|
|
|