Index: content/browser/indexed_db/cursor_impl.cc |
diff --git a/content/browser/indexed_db/cursor_impl.cc b/content/browser/indexed_db/cursor_impl.cc |
index 86d0e8f51b773a5a502cd6ef607ac41ecf18d66a..f818f7699ac25f227c924098b9ef6a8a124a6220 100644 |
--- a/content/browser/indexed_db/cursor_impl.cc |
+++ b/content/browser/indexed_db/cursor_impl.cc |
@@ -25,18 +25,16 @@ class CursorImpl::IDBThreadHelper { |
void PrefetchReset(int32_t used_prefetches, int32_t unused_prefetches); |
private: |
- scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; |
std::unique_ptr<IndexedDBCursor> cursor_; |
- const url::Origin origin_; |
DISALLOW_COPY_AND_ASSIGN(IDBThreadHelper); |
}; |
CursorImpl::CursorImpl(std::unique_ptr<IndexedDBCursor> cursor, |
const url::Origin& origin, |
- scoped_refptr<IndexedDBDispatcherHost> dispatcher_host) |
+ IndexedDBDispatcherHost* dispatcher_host) |
: helper_(new IDBThreadHelper(std::move(cursor))), |
- dispatcher_host_(std::move(dispatcher_host)), |
+ dispatcher_host_(dispatcher_host), |
origin_(origin), |
idb_runner_(base::ThreadTaskRunnerHandle::Get()) {} |
@@ -48,7 +46,7 @@ void CursorImpl::Advance( |
uint32_t count, |
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) { |
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks( |
- dispatcher_host_.get(), origin_, std::move(callbacks_info))); |
+ dispatcher_host_, origin_, std::move(callbacks_info))); |
idb_runner_->PostTask(FROM_HERE, base::Bind(&IDBThreadHelper::Advance, |
base::Unretained(helper_), count, |
base::Passed(&callbacks))); |
@@ -59,7 +57,7 @@ void CursorImpl::Continue( |
const IndexedDBKey& primary_key, |
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) { |
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks( |
- dispatcher_host_.get(), origin_, std::move(callbacks_info))); |
+ dispatcher_host_, origin_, std::move(callbacks_info))); |
idb_runner_->PostTask( |
FROM_HERE, |
base::Bind(&IDBThreadHelper::Continue, base::Unretained(helper_), key, |
@@ -70,7 +68,7 @@ void CursorImpl::Prefetch( |
int32_t count, |
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info) { |
scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks( |
- dispatcher_host_.get(), origin_, std::move(callbacks_info))); |
+ dispatcher_host_, origin_, std::move(callbacks_info))); |
idb_runner_->PostTask(FROM_HERE, base::Bind(&IDBThreadHelper::Prefetch, |
base::Unretained(helper_), count, |
base::Passed(&callbacks))); |