OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/indexed_db/proxy_webidbobjectstore_impl.h" | 5 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h" |
6 | 6 |
7 #include "content/common/indexed_db/indexed_db_messages.h" | 7 #include "content/common/indexed_db/indexed_db_messages.h" |
8 #include "content/public/common/serialized_script_value.h" | 8 #include "content/public/common/serialized_script_value.h" |
9 #include "content/common/indexed_db/indexed_db_dispatcher.h" | 9 #include "content/common/indexed_db/indexed_db_dispatcher.h" |
10 #include "content/common/indexed_db/proxy_webidbindex_impl.h" | 10 #include "content/common/indexed_db/proxy_webidbindex_impl.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 WebIDBCallbacks* callbacks, | 54 WebIDBCallbacks* callbacks, |
55 const WebIDBTransaction& transaction, | 55 const WebIDBTransaction& transaction, |
56 WebExceptionCode& ec) { | 56 WebExceptionCode& ec) { |
57 IndexedDBDispatcher* dispatcher = | 57 IndexedDBDispatcher* dispatcher = |
58 IndexedDBDispatcher::ThreadSpecificInstance(); | 58 IndexedDBDispatcher::ThreadSpecificInstance(); |
59 dispatcher->RequestIDBObjectStoreGet( | 59 dispatcher->RequestIDBObjectStoreGet( |
60 IndexedDBKeyRange(key_range), callbacks, | 60 IndexedDBKeyRange(key_range), callbacks, |
61 idb_object_store_id_, transaction, &ec); | 61 idb_object_store_id_, transaction, &ec); |
62 } | 62 } |
63 | 63 |
64 void RendererWebIDBObjectStoreImpl::put( | |
65 const WebSerializedScriptValue& value, | |
66 const WebIDBKey& key, | |
67 PutMode put_mode, | |
68 WebIDBCallbacks* callbacks, | |
69 const WebIDBTransaction& transaction, | |
70 WebExceptionCode& ec) { | |
71 IndexedDBDispatcher* dispatcher = | |
72 IndexedDBDispatcher::ThreadSpecificInstance(); | |
73 WebVector<WebString> emptyIndexNames; | |
74 WebVector<WebVector<WebIDBKey> > emptyIndexKeys; | |
75 dispatcher->RequestIDBObjectStorePut( | |
76 SerializedScriptValue(value), IndexedDBKey(key), | |
77 put_mode, callbacks, idb_object_store_id_, transaction, | |
78 emptyIndexNames, emptyIndexKeys, &ec); | |
79 } | |
80 | |
81 void RendererWebIDBObjectStoreImpl::putWithIndexKeys( | 64 void RendererWebIDBObjectStoreImpl::putWithIndexKeys( |
82 const WebSerializedScriptValue& value, | 65 const WebSerializedScriptValue& value, |
83 const WebIDBKey& key, | 66 const WebIDBKey& key, |
84 PutMode put_mode, | 67 PutMode put_mode, |
85 WebIDBCallbacks* callbacks, | 68 WebIDBCallbacks* callbacks, |
86 const WebIDBTransaction& transaction, | 69 const WebIDBTransaction& transaction, |
87 const WebVector<WebString>& indexNames, | 70 const WebVector<WebString>& indexNames, |
88 const WebVector<WebVector<WebIDBKey> >& indexKeys, | 71 const WebVector<WebVector<WebIDBKey> >& indexKeys, |
89 WebExceptionCode& ec) { | 72 WebExceptionCode& ec) { |
90 IndexedDBDispatcher* dispatcher = | 73 IndexedDBDispatcher* dispatcher = |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 const WebIDBKeyRange& idb_key_range, | 161 const WebIDBKeyRange& idb_key_range, |
179 WebIDBCallbacks* callbacks, | 162 WebIDBCallbacks* callbacks, |
180 const WebIDBTransaction& transaction, | 163 const WebIDBTransaction& transaction, |
181 WebExceptionCode& ec) { | 164 WebExceptionCode& ec) { |
182 IndexedDBDispatcher* dispatcher = | 165 IndexedDBDispatcher* dispatcher = |
183 IndexedDBDispatcher::ThreadSpecificInstance(); | 166 IndexedDBDispatcher::ThreadSpecificInstance(); |
184 dispatcher->RequestIDBObjectStoreCount( | 167 dispatcher->RequestIDBObjectStoreCount( |
185 idb_key_range, callbacks, idb_object_store_id_, | 168 idb_key_range, callbacks, idb_object_store_id_, |
186 transaction, &ec); | 169 transaction, &ec); |
187 } | 170 } |
OLD | NEW |