| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 idb_object_store_id_, &result)); | 63 idb_object_store_id_, &result)); |
| 64 WebDOMStringList web_result; | 64 WebDOMStringList web_result; |
| 65 for (std::vector<string16>::const_iterator it = result.begin(); | 65 for (std::vector<string16>::const_iterator it = result.begin(); |
| 66 it != result.end(); ++it) { | 66 it != result.end(); ++it) { |
| 67 web_result.append(*it); | 67 web_result.append(*it); |
| 68 } | 68 } |
| 69 return web_result; | 69 return web_result; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void RendererWebIDBObjectStoreImpl::get( | 72 void RendererWebIDBObjectStoreImpl::get( |
| 73 const WebIDBKey& key, | |
| 74 WebIDBCallbacks* callbacks, | |
| 75 const WebIDBTransaction& transaction, | |
| 76 WebExceptionCode& ec) { | |
| 77 IndexedDBDispatcher* dispatcher = | |
| 78 IndexedDBDispatcher::ThreadSpecificInstance(); | |
| 79 dispatcher->RequestIDBObjectStoreGet( | |
| 80 IndexedDBKey(key), callbacks, idb_object_store_id_, transaction, &ec); | |
| 81 } | |
| 82 | |
| 83 void RendererWebIDBObjectStoreImpl::get( | |
| 84 const WebIDBKeyRange& key_range, | 73 const WebIDBKeyRange& key_range, |
| 85 WebIDBCallbacks* callbacks, | 74 WebIDBCallbacks* callbacks, |
| 86 const WebIDBTransaction& transaction, | 75 const WebIDBTransaction& transaction, |
| 87 WebExceptionCode& ec) { | 76 WebExceptionCode& ec) { |
| 88 IndexedDBDispatcher* dispatcher = | 77 IndexedDBDispatcher* dispatcher = |
| 89 IndexedDBDispatcher::ThreadSpecificInstance(); | 78 IndexedDBDispatcher::ThreadSpecificInstance(); |
| 90 dispatcher->RequestIDBObjectStoreGetByRange( | 79 dispatcher->RequestIDBObjectStoreGet( |
| 91 IndexedDBKeyRange(key_range), callbacks, | 80 IndexedDBKeyRange(key_range), callbacks, |
| 92 idb_object_store_id_, transaction, &ec); | 81 idb_object_store_id_, transaction, &ec); |
| 93 } | 82 } |
| 94 | 83 |
| 95 void RendererWebIDBObjectStoreImpl::put( | 84 void RendererWebIDBObjectStoreImpl::put( |
| 96 const WebSerializedScriptValue& value, | 85 const WebSerializedScriptValue& value, |
| 97 const WebIDBKey& key, | 86 const WebIDBKey& key, |
| 98 PutMode put_mode, | 87 PutMode put_mode, |
| 99 WebIDBCallbacks* callbacks, | 88 WebIDBCallbacks* callbacks, |
| 100 const WebIDBTransaction& transaction, | 89 const WebIDBTransaction& transaction, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 const WebIDBKeyRange& idb_key_range, | 189 const WebIDBKeyRange& idb_key_range, |
| 201 WebIDBCallbacks* callbacks, | 190 WebIDBCallbacks* callbacks, |
| 202 const WebIDBTransaction& transaction, | 191 const WebIDBTransaction& transaction, |
| 203 WebExceptionCode& ec) { | 192 WebExceptionCode& ec) { |
| 204 IndexedDBDispatcher* dispatcher = | 193 IndexedDBDispatcher* dispatcher = |
| 205 IndexedDBDispatcher::ThreadSpecificInstance(); | 194 IndexedDBDispatcher::ThreadSpecificInstance(); |
| 206 dispatcher->RequestIDBObjectStoreCount( | 195 dispatcher->RequestIDBObjectStoreCount( |
| 207 idb_key_range, callbacks, idb_object_store_id_, | 196 idb_key_range, callbacks, idb_object_store_id_, |
| 208 transaction, &ec); | 197 transaction, &ec); |
| 209 } | 198 } |
| OLD | NEW |