| 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 "chrome/browser/chrome_thread.h" | 8 #include "chrome/browser/chrome_thread.h" |
| 9 #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" | 9 #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" |
| 10 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 10 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 385 |
| 386 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnRemoveObjectStore( | 386 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnRemoveObjectStore( |
| 387 int32 idb_database_id, int32 response_id, const string16& name) { | 387 int32 idb_database_id, int32 response_id, const string16& name) { |
| 388 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)); | 388 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)); |
| 389 WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( | 389 WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( |
| 390 &map_, idb_database_id, NULL, | 390 &map_, idb_database_id, NULL, |
| 391 ViewHostMsg_IDBDatabaseRemoveObjectStore::ID); | 391 ViewHostMsg_IDBDatabaseRemoveObjectStore::ID); |
| 392 if (!idb_database) | 392 if (!idb_database) |
| 393 return; | 393 return; |
| 394 idb_database->removeObjectStore( | 394 idb_database->removeObjectStore( |
| 395 name, new IndexedDBCallbacks<WebIDBObjectStore>(parent_, response_id)); | 395 name, new IndexedDBCallbacks<void>(parent_, response_id)); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnTransaction( | 398 void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnTransaction( |
| 399 int32 idb_database_id, const std::vector<string16>& names, | 399 int32 idb_database_id, const std::vector<string16>& names, |
| 400 int32 mode, int32 timeout, IPC::Message* reply_msg) { | 400 int32 mode, int32 timeout, IPC::Message* reply_msg) { |
| 401 WebIDBDatabase* database = parent_->GetOrTerminateProcess( | 401 WebIDBDatabase* database = parent_->GetOrTerminateProcess( |
| 402 &map_, idb_database_id, reply_msg, | 402 &map_, idb_database_id, reply_msg, |
| 403 ViewHostMsg_IDBDatabaseTransaction::ID); | 403 ViewHostMsg_IDBDatabaseTransaction::ID); |
| 404 if (!database) | 404 if (!database) |
| 405 return; | 405 return; |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 // never actually be called. | 766 // never actually be called. |
| 767 NOTREACHED(); | 767 NOTREACHED(); |
| 768 parent_->Send(message); | 768 parent_->Send(message); |
| 769 } | 769 } |
| 770 | 770 |
| 771 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( | 771 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( |
| 772 int32 object_id) { | 772 int32 object_id) { |
| 773 parent_->DestroyObject( | 773 parent_->DestroyObject( |
| 774 &map_, object_id, ViewHostMsg_IDBTransactionDestroyed::ID); | 774 &map_, object_id, ViewHostMsg_IDBTransactionDestroyed::ID); |
| 775 } | 775 } |
| OLD | NEW |