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/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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); | 108 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
109 dispatcher->RequestIDBDatabaseGet(ipc_database_id_, | 109 dispatcher->RequestIDBDatabaseGet(ipc_database_id_, |
110 transaction_id, | 110 transaction_id, |
111 object_store_id, | 111 object_store_id, |
112 index_id, | 112 index_id, |
113 IndexedDBKeyRangeBuilder::Build(key_range), | 113 IndexedDBKeyRangeBuilder::Build(key_range), |
114 key_only, | 114 key_only, |
115 callbacks); | 115 callbacks); |
116 } | 116 } |
117 | 117 |
| 118 void WebIDBDatabaseImpl::getAll(long long transaction_id, |
| 119 long long object_store_id, |
| 120 const WebIDBKeyRange& key_range, |
| 121 long long max_count, |
| 122 WebIDBCallbacks* callbacks) { |
| 123 IndexedDBDispatcher* dispatcher = |
| 124 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
| 125 dispatcher->RequestIDBDatabaseGetAll( |
| 126 ipc_database_id_, transaction_id, object_store_id, |
| 127 IndexedDBKeyRangeBuilder::Build(key_range), max_count, callbacks); |
| 128 } |
| 129 |
118 void WebIDBDatabaseImpl::put(long long transaction_id, | 130 void WebIDBDatabaseImpl::put(long long transaction_id, |
119 long long object_store_id, | 131 long long object_store_id, |
120 const blink::WebData& value, | 132 const blink::WebData& value, |
121 const blink::WebVector<WebBlobInfo>& web_blob_info, | 133 const blink::WebVector<WebBlobInfo>& web_blob_info, |
122 const WebIDBKey& key, | 134 const WebIDBKey& key, |
123 blink::WebIDBPutMode put_mode, | 135 blink::WebIDBPutMode put_mode, |
124 WebIDBCallbacks* callbacks, | 136 WebIDBCallbacks* callbacks, |
125 const WebVector<long long>& web_index_ids, | 137 const WebVector<long long>& web_index_ids, |
126 const WebVector<WebIndexKeys>& web_index_keys) { | 138 const WebVector<WebIndexKeys>& web_index_keys) { |
127 IndexedDBDispatcher* dispatcher = | 139 IndexedDBDispatcher* dispatcher = |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 286 |
275 void WebIDBDatabaseImpl::ackReceivedBlobs(const WebVector<WebString>& uuids) { | 287 void WebIDBDatabaseImpl::ackReceivedBlobs(const WebVector<WebString>& uuids) { |
276 DCHECK(uuids.size()); | 288 DCHECK(uuids.size()); |
277 std::vector<std::string> param(uuids.size()); | 289 std::vector<std::string> param(uuids.size()); |
278 for (size_t i = 0; i < uuids.size(); ++i) | 290 for (size_t i = 0; i < uuids.size(); ++i) |
279 param[i] = uuids[i].latin1().data(); | 291 param[i] = uuids[i].latin1().data(); |
280 thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param)); | 292 thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param)); |
281 } | 293 } |
282 | 294 |
283 } // namespace content | 295 } // namespace content |
OLD | NEW |