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 b52f5f13eb9ba52fcf31cae546d95fc9a39b3527..698a6a2b47a72b19308daa7f0e193c2ea37fc8ad 100644 |
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
@@ -240,10 +240,20 @@ void IndexedDBDispatcherHost::OnIDBFactoryOpen( |
quota = 1024 * 1024 * 1024; // 1GB. More or less "unlimited". |
} |
+ WebKit::WebIDBFactory::BackingStoreImpl backingStoreImpl |
+ = WebKit::WebIDBFactory::DefaultBackingStore; |
+ |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kLevelDBIndexedDatabase)) { |
+ backingStoreImpl = WebKit::WebIDBFactory::LevelDBBackingStore; |
+ } |
+ |
+ |
Context()->GetIDBFactory()->open( |
params.name, |
new IndexedDBCallbacks<WebIDBDatabase>(this, params.response_id), origin, |
- NULL, webkit_glue::FilePathToWebString(indexed_db_path), quota); |
+ NULL, webkit_glue::FilePathToWebString(indexed_db_path), quota, |
+ backingStoreImpl); |
} |
void IndexedDBDispatcherHost::OnIDBFactoryDeleteDatabase( |