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

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

Issue 1147433002: IndexedDB: Added IDBIndex.getAll() implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaked getAll comments in indexed_db_database.cc Created 5 years, 7 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
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/webidbdatabase_impl.h" 5 #include "content/child/indexed_db/webidbdatabase_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "content/child/indexed_db/indexed_db_dispatcher.h" 10 #include "content/child/indexed_db/indexed_db_dispatcher.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 callbacks); 115 callbacks);
116 } 116 }
117 117
118 void WebIDBDatabaseImpl::getAll(long long transaction_id, 118 void WebIDBDatabaseImpl::getAll(long long transaction_id,
119 long long object_store_id, 119 long long object_store_id,
120 long long index_id, 120 long long index_id,
121 const WebIDBKeyRange& key_range, 121 const WebIDBKeyRange& key_range,
122 long long max_count, 122 long long max_count,
123 bool key_only, 123 bool key_only,
124 WebIDBCallbacks* callbacks) { 124 WebIDBCallbacks* callbacks) {
125 // TODO(cmumford): Remove DCHECK's for index_id/key_only once IDBIndex.getAll 125 // TODO(cmumford): Remove DCHECK for key_only once IDBIndex.getAllKeys is
126 // is implemented. 126 // implemented.
127 static const int64 kInvalidId = -1;
128 DCHECK_EQ(kInvalidId, index_id);
129 DCHECK(!key_only); 127 DCHECK(!key_only);
130 IndexedDBDispatcher* dispatcher = 128 IndexedDBDispatcher* dispatcher =
131 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); 129 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
132 dispatcher->RequestIDBDatabaseGetAll( 130 dispatcher->RequestIDBDatabaseGetAll(
133 ipc_database_id_, transaction_id, object_store_id, 131 ipc_database_id_, transaction_id, object_store_id, index_id,
134 IndexedDBKeyRangeBuilder::Build(key_range), max_count, callbacks); 132 IndexedDBKeyRangeBuilder::Build(key_range), max_count, callbacks);
135 } 133 }
136 134
137 void WebIDBDatabaseImpl::put(long long transaction_id, 135 void WebIDBDatabaseImpl::put(long long transaction_id,
138 long long object_store_id, 136 long long object_store_id,
139 const blink::WebData& value, 137 const blink::WebData& value,
140 const blink::WebVector<WebBlobInfo>& web_blob_info, 138 const blink::WebVector<WebBlobInfo>& web_blob_info,
141 const WebIDBKey& key, 139 const WebIDBKey& key,
142 blink::WebIDBPutMode put_mode, 140 blink::WebIDBPutMode put_mode,
143 WebIDBCallbacks* callbacks, 141 WebIDBCallbacks* callbacks,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 291
294 void WebIDBDatabaseImpl::ackReceivedBlobs(const WebVector<WebString>& uuids) { 292 void WebIDBDatabaseImpl::ackReceivedBlobs(const WebVector<WebString>& uuids) {
295 DCHECK(uuids.size()); 293 DCHECK(uuids.size());
296 std::vector<std::string> param(uuids.size()); 294 std::vector<std::string> param(uuids.size());
297 for (size_t i = 0; i < uuids.size(); ++i) 295 for (size_t i = 0; i < uuids.size(); ++i)
298 param[i] = uuids[i].latin1().data(); 296 param[i] = uuids[i].latin1().data();
299 thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param)); 297 thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param));
300 } 298 }
301 299
302 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.cc ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698