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/threading/thread_task_runner_handle.h" |
7 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 8 #include "content/browser/indexed_db/indexed_db_callbacks.h" |
8 #include "content/browser/indexed_db/indexed_db_cursor.h" | 9 #include "content/browser/indexed_db/indexed_db_cursor.h" |
9 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 10 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 class CursorImpl::IDBThreadHelper { | 14 class CursorImpl::IDBThreadHelper { |
14 public: | 15 public: |
15 explicit IDBThreadHelper(std::unique_ptr<IndexedDBCursor> cursor); | 16 explicit IDBThreadHelper(std::unique_ptr<IndexedDBCursor> cursor); |
16 ~IDBThreadHelper(); | 17 ~IDBThreadHelper(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void CursorImpl::IDBThreadHelper::PrefetchReset(int32_t used_prefetches, | 122 void CursorImpl::IDBThreadHelper::PrefetchReset(int32_t used_prefetches, |
122 int32_t unused_prefetches) { | 123 int32_t unused_prefetches) { |
123 leveldb::Status s = | 124 leveldb::Status s = |
124 cursor_->PrefetchReset(used_prefetches, unused_prefetches); | 125 cursor_->PrefetchReset(used_prefetches, unused_prefetches); |
125 // TODO(cmumford): Handle this error (crbug.com/363397) | 126 // TODO(cmumford): Handle this error (crbug.com/363397) |
126 if (!s.ok()) | 127 if (!s.ok()) |
127 DLOG(ERROR) << "Unable to reset prefetch"; | 128 DLOG(ERROR) << "Unable to reset prefetch"; |
128 } | 129 } |
129 | 130 |
130 } // namespace content | 131 } // namespace content |
OLD | NEW |