Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Side by Side Diff: content/child/indexed_db/proxy_webidbcursor_impl.cc

Issue 19442002: Convert to new WebIDBTypes enums and accessors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix content/common/DEPS Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/proxy_webidbcursor_impl.h" 5 #include "content/child/indexed_db/proxy_webidbcursor_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "content/child/thread_safe_sender.h" 9 #include "content/child/thread_safe_sender.h"
10 #include "content/child/indexed_db/indexed_db_dispatcher.h" 10 #include "content/child/indexed_db/indexed_db_dispatcher.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 count, callbacks.release(), ipc_cursor_id_); 52 count, callbacks.release(), ipc_cursor_id_);
53 } 53 }
54 54
55 void RendererWebIDBCursorImpl::continueFunction( 55 void RendererWebIDBCursorImpl::continueFunction(
56 const WebIDBKey& key, 56 const WebIDBKey& key,
57 WebIDBCallbacks* callbacks_ptr) { 57 WebIDBCallbacks* callbacks_ptr) {
58 IndexedDBDispatcher* dispatcher = 58 IndexedDBDispatcher* dispatcher =
59 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); 59 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
60 scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); 60 scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
61 61
62 if (key.type() == WebIDBKey::NullType) { 62 if (key.keyType() == WebKit::WebIDBKeyTypeNull) {
63 // No key, so this would qualify for a prefetch. 63 // No key, so this would qualify for a prefetch.
64 ++continue_count_; 64 ++continue_count_;
65 65
66 if (!prefetch_keys_.empty()) { 66 if (!prefetch_keys_.empty()) {
67 // We have a prefetch cache, so serve the result from that. 67 // We have a prefetch cache, so serve the result from that.
68 CachedContinue(callbacks.get()); 68 CachedContinue(callbacks.get());
69 return; 69 return;
70 } 70 }
71 71
72 if (continue_count_ > kPrefetchContinueThreshold) { 72 if (continue_count_ > kPrefetchContinueThreshold) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 dispatcher->RequestIDBCursorPrefetchReset( 150 dispatcher->RequestIDBCursorPrefetchReset(
151 used_prefetches_, prefetch_keys_.size(), ipc_cursor_id_); 151 used_prefetches_, prefetch_keys_.size(), ipc_cursor_id_);
152 prefetch_keys_.clear(); 152 prefetch_keys_.clear();
153 prefetch_primary_keys_.clear(); 153 prefetch_primary_keys_.clear();
154 prefetch_values_.clear(); 154 prefetch_values_.clear();
155 155
156 pending_onsuccess_callbacks_ = 0; 156 pending_onsuccess_callbacks_ = 0;
157 } 157 }
158 158
159 } // namespace content 159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698