| 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/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 5 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 IPC_END_MESSAGE_MAP() | 885 IPC_END_MESSAGE_MAP() |
| 886 return handled; | 886 return handled; |
| 887 } | 887 } |
| 888 | 888 |
| 889 | 889 |
| 890 void IndexedDBDispatcherHost::CursorDispatcherHost::Send( | 890 void IndexedDBDispatcherHost::CursorDispatcherHost::Send( |
| 891 IPC::Message* message) { | 891 IPC::Message* message) { |
| 892 parent_->Send(message); | 892 parent_->Send(message); |
| 893 } | 893 } |
| 894 | 894 |
| 895 // TODO(jsbell): Remove this after WK92278 rolls. |
| 895 void IndexedDBDispatcherHost::CursorDispatcherHost::OnKey( | 896 void IndexedDBDispatcherHost::CursorDispatcherHost::OnKey( |
| 896 int32 object_id, IndexedDBKey* key) { | 897 int32 object_id, IndexedDBKey* key) { |
| 897 WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, object_id); | 898 WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, object_id); |
| 898 if (!idb_cursor) | 899 if (!idb_cursor) |
| 899 return; | 900 return; |
| 900 | 901 |
| 901 *key = IndexedDBKey(idb_cursor->key()); | 902 *key = IndexedDBKey(idb_cursor->key()); |
| 902 } | 903 } |
| 903 | 904 |
| 905 // TODO(jsbell): Remove this after WK92278 rolls. |
| 904 void IndexedDBDispatcherHost::CursorDispatcherHost::OnPrimaryKey( | 906 void IndexedDBDispatcherHost::CursorDispatcherHost::OnPrimaryKey( |
| 905 int32 object_id, IndexedDBKey* primary_key) { | 907 int32 object_id, IndexedDBKey* primary_key) { |
| 906 WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, object_id); | 908 WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, object_id); |
| 907 if (!idb_cursor) | 909 if (!idb_cursor) |
| 908 return; | 910 return; |
| 909 | 911 |
| 910 *primary_key = IndexedDBKey(idb_cursor->primaryKey()); | 912 *primary_key = IndexedDBKey(idb_cursor->primaryKey()); |
| 911 } | 913 } |
| 912 | 914 |
| 915 // TODO(jsbell): Remove this after WK92278 rolls. |
| 913 void IndexedDBDispatcherHost::CursorDispatcherHost::OnValue( | 916 void IndexedDBDispatcherHost::CursorDispatcherHost::OnValue( |
| 914 int32 object_id, | 917 int32 object_id, |
| 915 SerializedScriptValue* script_value) { | 918 SerializedScriptValue* script_value) { |
| 916 WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, object_id); | 919 WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, object_id); |
| 917 if (!idb_cursor) | 920 if (!idb_cursor) |
| 918 return; | 921 return; |
| 919 | 922 |
| 920 *script_value = SerializedScriptValue(idb_cursor->value()); | 923 *script_value = SerializedScriptValue(idb_cursor->value()); |
| 921 } | 924 } |
| 922 | 925 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 } | 1101 } |
| 1099 | 1102 |
| 1100 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 1103 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
| 1101 int32 object_id) { | 1104 int32 object_id) { |
| 1102 // TODO(dgrogan): This doesn't seem to be happening with some version change | 1105 // TODO(dgrogan): This doesn't seem to be happening with some version change |
| 1103 // transactions. Possibly introduced with integer version support. | 1106 // transactions. Possibly introduced with integer version support. |
| 1104 transaction_size_map_.erase(object_id); | 1107 transaction_size_map_.erase(object_id); |
| 1105 transaction_url_map_.erase(object_id); | 1108 transaction_url_map_.erase(object_id); |
| 1106 parent_->DestroyObject(&map_, object_id); | 1109 parent_->DestroyObject(&map_, object_id); |
| 1107 } | 1110 } |
| OLD | NEW |