| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 5 #include "chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 | 919 |
| 920 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnObjectStore( | 920 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnObjectStore( |
| 921 int32 transaction_id, const string16& name, int32* object_store_id, | 921 int32 transaction_id, const string16& name, int32* object_store_id, |
| 922 WebKit::WebExceptionCode* ec) { | 922 WebKit::WebExceptionCode* ec) { |
| 923 WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( | 923 WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( |
| 924 &map_, transaction_id, IndexedDBHostMsg_TransactionObjectStore::ID); | 924 &map_, transaction_id, IndexedDBHostMsg_TransactionObjectStore::ID); |
| 925 if (!idb_transaction) | 925 if (!idb_transaction) |
| 926 return; | 926 return; |
| 927 | 927 |
| 928 WebIDBObjectStore* object_store = idb_transaction->objectStore(name, *ec); | 928 WebIDBObjectStore* object_store = idb_transaction->objectStore(name, *ec); |
| 929 *object_store_id = object_store ? parent_->Add(object_store) : 0; |
| 929 } | 930 } |
| 930 | 931 |
| 931 void IndexedDBDispatcherHost:: | 932 void IndexedDBDispatcherHost:: |
| 932 TransactionDispatcherHost::OnDidCompleteTaskEvents(int transaction_id) { | 933 TransactionDispatcherHost::OnDidCompleteTaskEvents(int transaction_id) { |
| 933 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); | 934 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); |
| 934 WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( | 935 WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( |
| 935 &map_, transaction_id, | 936 &map_, transaction_id, |
| 936 IndexedDBHostMsg_TransactionDidCompleteTaskEvents::ID); | 937 IndexedDBHostMsg_TransactionDidCompleteTaskEvents::ID); |
| 937 if (!idb_transaction) | 938 if (!idb_transaction) |
| 938 return; | 939 return; |
| 939 | 940 |
| 940 idb_transaction->didCompleteTaskEvents(); | 941 idb_transaction->didCompleteTaskEvents(); |
| 941 } | 942 } |
| 942 | 943 |
| 943 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 944 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
| 944 int32 object_id) { | 945 int32 object_id) { |
| 945 parent_->DestroyObject( | 946 parent_->DestroyObject( |
| 946 &map_, object_id, IndexedDBHostMsg_TransactionDestroyed::ID); | 947 &map_, object_id, IndexedDBHostMsg_TransactionDestroyed::ID); |
| 947 } | 948 } |
| OLD | NEW |