OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/indexed_db/cursor_impl.h" | 5 #include "content/browser/indexed_db/cursor_impl.h" |
6 | 6 |
| 7 #include "base/memory/ptr_util.h" |
7 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
8 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 9 #include "content/browser/indexed_db/indexed_db_callbacks.h" |
9 #include "content/browser/indexed_db/indexed_db_cursor.h" | 10 #include "content/browser/indexed_db/indexed_db_cursor.h" |
10 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 11 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 class CursorImpl::IDBThreadHelper { | 15 class CursorImpl::IDBThreadHelper { |
15 public: | 16 public: |
16 explicit IDBThreadHelper(std::unique_ptr<IndexedDBCursor> cursor); | 17 explicit IDBThreadHelper(std::unique_ptr<IndexedDBCursor> cursor); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 void CursorImpl::IDBThreadHelper::PrefetchReset(int32_t used_prefetches, | 123 void CursorImpl::IDBThreadHelper::PrefetchReset(int32_t used_prefetches, |
123 int32_t unused_prefetches) { | 124 int32_t unused_prefetches) { |
124 leveldb::Status s = | 125 leveldb::Status s = |
125 cursor_->PrefetchReset(used_prefetches, unused_prefetches); | 126 cursor_->PrefetchReset(used_prefetches, unused_prefetches); |
126 // TODO(cmumford): Handle this error (crbug.com/363397) | 127 // TODO(cmumford): Handle this error (crbug.com/363397) |
127 if (!s.ok()) | 128 if (!s.ok()) |
128 DLOG(ERROR) << "Unable to reset prefetch"; | 129 DLOG(ERROR) << "Unable to reset prefetch"; |
129 } | 130 } |
130 | 131 |
131 } // namespace content | 132 } // namespace content |
OLD | NEW |