Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc

Issue 10533057: IPC plumbing for IndexedDB to snapshot metadata to the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't CamelCase "metadata" Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index 1f5112509ef6803422e23de14ff2fd322e4095d8..73980a577066035109797b661f8d9732881182f0 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -35,6 +35,7 @@
using content::BrowserMessageFilter;
using content::BrowserThread;
+using content::IndexedDBDatabaseMetadata;
using content::IndexedDBKey;
using content::IndexedDBKeyPath;
using content::IndexedDBKeyRange;
@@ -324,6 +325,7 @@ bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived(
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(IndexedDBDispatcherHost::DatabaseDispatcherHost,
message, *msg_is_ok)
+ IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseMetadata, OnMetadata)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseName, OnName)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseVersion, OnVersion)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseObjectStoreNames,
@@ -347,6 +349,16 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::Send(
parent_->Send(message);
}
+void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMetadata(
+ int32 object_id, content::IndexedDBDatabaseMetadata* metadata) {
+ WebIDBDatabase* idb_database = parent_->GetOrTerminateProcess(
+ &map_, object_id);
+ if (!idb_database)
+ return;
+
+ *metadata = IndexedDBDatabaseMetadata(idb_database->metadata());
+}
+
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnName(
int32 object_id, string16* name) {
parent_->SyncGetter<string16>(&map_, object_id, name, &WebIDBDatabase::name);

Powered by Google App Engine
This is Rietveld 408576698