summaryrefslogtreecommitdiffstats
path: root/chrome/browser/in_process_webkit
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 19:27:51 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 19:27:51 +0000
commitde9b8a94dfd440760cf78d46df6f21f51c3590bb (patch)
tree46e9b1b2b8471d9b0d6cf79d27b5669be83e49b8 /chrome/browser/in_process_webkit
parent07ec1df8020cf3d64e7bb4d385442ef3d7f3ff3b (diff)
downloadchromium_src-de9b8a94dfd440760cf78d46df6f21f51c3590bb.zip
chromium_src-de9b8a94dfd440760cf78d46df6f21f51c3590bb.tar.gz
chromium_src-de9b8a94dfd440760cf78d46df6f21f51c3590bb.tar.bz2
Land 6266021 for David.
Plumbing for initial close() support for indexed db. BUG=64049 TEST=browser_tests --gtest_filter=IndexedDBBrowserTest.* Review URL: http://codereview.chromium.org/6348027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/in_process_webkit')
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc10
-rw-r--r--chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index 05de7c3..f7461a7 100644
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -287,6 +287,7 @@ bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived(
OnDeleteObjectStore)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetVersion, OnSetVersion)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseTransaction, OnTransaction)
+ IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseClose, OnClose)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDestroyed, OnDestroyed)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -400,7 +401,14 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnTransaction(
*idb_transaction_id = *ec ? 0 : parent_->Add(transaction);
}
-void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnDestroyed(
+void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnClose(
+ int32 idb_database_id) {
+ WebIDBDatabase* database = parent_->GetOrTerminateProcess(
+ &map_, idb_database_id);
+ database->close();
+}
+
+ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnDestroyed(
int32 object_id) {
parent_->DestroyObject(&map_, object_id);
}
diff --git a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h
index 1559fe1..8bc3f1a 100644
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h
@@ -105,6 +105,7 @@ class IndexedDBDispatcherHost : public BrowserMessageFilter {
int32 mode, int32 timeout,
int32* idb_transaction_id,
WebKit::WebExceptionCode* ec);
+ void OnClose(int32 idb_database_id);
void OnDestroyed(int32 idb_database_id);
IndexedDBDispatcherHost* parent_;