| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "content/child/indexed_db/indexed_db_dispatcher.h" | 9 #include "content/child/indexed_db/indexed_db_dispatcher.h" |
| 10 #include "content/child/indexed_db/indexed_db_key_builders.h" | 10 #include "content/child/indexed_db/indexed_db_key_builders.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); | 101 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); |
| 102 dispatcher->RequestIDBDatabaseGet(ipc_database_id_, | 102 dispatcher->RequestIDBDatabaseGet(ipc_database_id_, |
| 103 transaction_id, | 103 transaction_id, |
| 104 object_store_id, | 104 object_store_id, |
| 105 index_id, | 105 index_id, |
| 106 IndexedDBKeyRangeBuilder::Build(key_range), | 106 IndexedDBKeyRangeBuilder::Build(key_range), |
| 107 key_only, | 107 key_only, |
| 108 callbacks); | 108 callbacks); |
| 109 } | 109 } |
| 110 | 110 |
| 111 // TODO(ericu): Remove this once it's obsolete. It's only here for the | |
| 112 // three-sided-patch dance. | |
| 113 void WebIDBDatabaseImpl::put(long long transaction_id, | |
| 114 long long object_store_id, | |
| 115 const blink::WebData& value, | |
| 116 const WebIDBKey& key, | |
| 117 PutMode put_mode, | |
| 118 WebIDBCallbacks* callbacks, | |
| 119 const WebVector<long long>& web_index_ids, | |
| 120 const WebVector<WebIndexKeys>& web_index_keys) { | |
| 121 IndexedDBDispatcher* dispatcher = | |
| 122 IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); | |
| 123 const blink::WebVector<WebBlobInfo> web_blob_info; | |
| 124 dispatcher->RequestIDBDatabasePut(ipc_database_id_, | |
| 125 transaction_id, | |
| 126 object_store_id, | |
| 127 value, | |
| 128 web_blob_info, | |
| 129 IndexedDBKeyBuilder::Build(key), | |
| 130 put_mode, | |
| 131 callbacks, | |
| 132 web_index_ids, | |
| 133 web_index_keys); | |
| 134 } | |
| 135 | |
| 136 void WebIDBDatabaseImpl::put(long long transaction_id, | 111 void WebIDBDatabaseImpl::put(long long transaction_id, |
| 137 long long object_store_id, | 112 long long object_store_id, |
| 138 const blink::WebData& value, | 113 const blink::WebData& value, |
| 139 const blink::WebVector<WebBlobInfo>& web_blob_info, | 114 const blink::WebVector<WebBlobInfo>& web_blob_info, |
| 140 const WebIDBKey& key, | 115 const WebIDBKey& key, |
| 141 PutMode put_mode, | 116 PutMode put_mode, |
| 142 WebIDBCallbacks* callbacks, | 117 WebIDBCallbacks* callbacks, |
| 143 const WebVector<long long>& web_index_ids, | 118 const WebVector<long long>& web_index_ids, |
| 144 const WebVector<WebIndexKeys>& web_index_keys) { | 119 const WebVector<WebIndexKeys>& web_index_keys) { |
| 145 IndexedDBDispatcher* dispatcher = | 120 IndexedDBDispatcher* dispatcher = |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 267 |
| 293 void WebIDBDatabaseImpl::ackReceivedBlobs(const WebVector<WebString>& uuids) { | 268 void WebIDBDatabaseImpl::ackReceivedBlobs(const WebVector<WebString>& uuids) { |
| 294 DCHECK(uuids.size()); | 269 DCHECK(uuids.size()); |
| 295 std::vector<std::string> param(uuids.size()); | 270 std::vector<std::string> param(uuids.size()); |
| 296 for (size_t i = 0; i < uuids.size(); ++i) | 271 for (size_t i = 0; i < uuids.size(); ++i) |
| 297 param[i] = uuids[i].latin1().data(); | 272 param[i] = uuids[i].latin1().data(); |
| 298 thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param)); | 273 thread_safe_sender_->Send(new IndexedDBHostMsg_AckReceivedBlobs(param)); |
| 299 } | 274 } |
| 300 | 275 |
| 301 } // namespace content | 276 } // namespace content |
| OLD | NEW |