diff options
author | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 14:23:42 +0000 |
---|---|---|
committer | jorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-31 14:23:42 +0000 |
commit | 7638b15cfd0a0ae642d65161ab0ea361e23ae4c6 (patch) | |
tree | 6bd4261b8317ddc836cf30996ac897975f61f108 /chrome/browser/in_process_webkit | |
parent | 9a86b04e0f0df56fcc55eee8b1d380cdc83bc54b (diff) | |
download | chromium_src-7638b15cfd0a0ae642d65161ab0ea361e23ae4c6.zip chromium_src-7638b15cfd0a0ae642d65161ab0ea361e23ae4c6.tar.gz chromium_src-7638b15cfd0a0ae642d65161ab0ea361e23ae4c6.tar.bz2 |
Implement the Chrome half of setVersion.
TEST=setVersion layout test works in non-single-process-mode
BUG=none
Review URL: http://codereview.chromium.org/3116043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57988 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.cc | 15 | ||||
-rw-r--r-- | chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h | 3 |
2 files changed, 18 insertions, 0 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 9967548..dadebf0 100644 --- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc +++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc @@ -107,6 +107,7 @@ bool IndexedDBDispatcherHost::OnMessageReceived(const IPC::Message& message) { case ViewHostMsg_IDBDatabaseCreateObjectStore::ID: case ViewHostMsg_IDBDatabaseObjectStore::ID: case ViewHostMsg_IDBDatabaseRemoveObjectStore::ID: + case ViewHostMsg_IDBDatabaseSetVersion::ID: case ViewHostMsg_IDBDatabaseTransaction::ID: case ViewHostMsg_IDBDatabaseDestroyed::ID: case ViewHostMsg_IDBIndexName::ID: @@ -304,6 +305,8 @@ bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived( OnObjectStore) IPC_MESSAGE_HANDLER(ViewHostMsg_IDBDatabaseRemoveObjectStore, OnRemoveObjectStore) + IPC_MESSAGE_HANDLER(ViewHostMsg_IDBDatabaseSetVersion, + OnSetVersion) IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_IDBDatabaseTransaction, OnTransaction) IPC_MESSAGE_HANDLER(ViewHostMsg_IDBDatabaseDestroyed, OnDestroyed) @@ -397,6 +400,18 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnRemoveObjectStore( name, new IndexedDBCallbacks<void>(parent_, response_id)); } +void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnSetVersion( + int32 idb_database_id, int32 response_id, const string16& version) { + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT)); + WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess( + &map_, idb_database_id, NULL, + ViewHostMsg_IDBDatabaseSetVersion::ID); + if (!idb_database) + return; + idb_database->setVersion( + version, new IndexedDBCallbacks<void>(parent_, response_id)); +} + void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnTransaction( int32 idb_database_id, const std::vector<string16>& names, int32 mode, int32 timeout, IPC::Message* reply_msg) { 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 acf4acc..d461ee8 100644 --- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h +++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.h @@ -106,6 +106,9 @@ class IndexedDBDispatcherHost IPC::Message* reply_msg); void OnRemoveObjectStore(int32 idb_database_id, int32 response_id, const string16& name); + void OnSetVersion(int32 idb_database_id, + int32 response_id, + const string16& version); void OnTransaction(int32 idb_database_id, const std::vector<string16>& names, int32 mode, int32 timeout, IPC::Message* reply_msg); |