| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/child/indexed_db/webidbcursor_impl.h" | 5 #include "content/child/indexed_db/webidbcursor_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <string> | 9 #include <string> |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 12 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 11 #include "content/child/indexed_db/indexed_db_key_builders.h" | 13 #include "content/child/indexed_db/indexed_db_key_builders.h" |
| 12 #include "content/child/thread_safe_sender.h" | 14 #include "content/child/thread_safe_sender.h" |
| 13 #include "content/common/indexed_db/indexed_db_messages.h" | 15 #include "content/common/indexed_db/indexed_db_messages.h" |
| 14 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h" | 16 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h" |
| 15 | 17 |
| 16 using blink::WebBlobInfo; | 18 using blink::WebBlobInfo; |
| 17 using blink::WebData; | 19 using blink::WebData; |
| 18 using blink::WebIDBCallbacks; | 20 using blink::WebIDBCallbacks; |
| 19 using blink::WebIDBKey; | 21 using blink::WebIDBKey; |
| 20 using blink::WebIDBValue; | 22 using blink::WebIDBValue; |
| 21 | 23 |
| 22 namespace content { | 24 namespace content { |
| 23 | 25 |
| 24 WebIDBCursorImpl::WebIDBCursorImpl(int32 ipc_cursor_id, | 26 WebIDBCursorImpl::WebIDBCursorImpl(int32_t ipc_cursor_id, |
| 25 int64 transaction_id, | 27 int64_t transaction_id, |
| 26 ThreadSafeSender* thread_safe_sender) | 28 ThreadSafeSender* thread_safe_sender) |
| 27 : ipc_cursor_id_(ipc_cursor_id), | 29 : ipc_cursor_id_(ipc_cursor_id), |
| 28 transaction_id_(transaction_id), | 30 transaction_id_(transaction_id), |
| 29 continue_count_(0), | 31 continue_count_(0), |
| 30 used_prefetches_(0), | 32 used_prefetches_(0), |
| 31 pending_onsuccess_callbacks_(0), | 33 pending_onsuccess_callbacks_(0), |
| 32 prefetch_amount_(kMinPrefetchAmount), | 34 prefetch_amount_(kMinPrefetchAmount), |
| 33 thread_safe_sender_(thread_safe_sender) {} | 35 thread_safe_sender_(thread_safe_sender) {} |
| 34 | 36 |
| 35 WebIDBCursorImpl::~WebIDBCursorImpl() { | 37 WebIDBCursorImpl::~WebIDBCursorImpl() { |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 208 |
| 207 // Reset the prefetch cache. | 209 // Reset the prefetch cache. |
| 208 prefetch_keys_.clear(); | 210 prefetch_keys_.clear(); |
| 209 prefetch_primary_keys_.clear(); | 211 prefetch_primary_keys_.clear(); |
| 210 prefetch_values_.clear(); | 212 prefetch_values_.clear(); |
| 211 | 213 |
| 212 pending_onsuccess_callbacks_ = 0; | 214 pending_onsuccess_callbacks_ = 0; |
| 213 } | 215 } |
| 214 | 216 |
| 215 } // namespace content | 217 } // namespace content |
| OLD | NEW |