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

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

Issue 3729003: Add plumbing for passing the indexed database quota via IDBFactory::open (Closed)
Patch Set: Address Jeremy's comments Created 10 years, 2 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
« no previous file with comments | « no previous file | chrome/common/render_messages_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
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 16a0ed716a9b9fb3fa917b54df87807092b45859..5e44316a930e9fa742416e11d400f2d476208ab9 100644
--- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -48,6 +48,10 @@ using WebKit::WebVector;
namespace {
+// FIXME: Replace this magic constant once we have a more sophisticated quota
+// system.
+static const uint64 kDatabaseQuota = 5 * 1024 * 1024;
+
template <class T>
void DeleteOnWebKitThread(T* obj) {
if (!BrowserThread::DeleteSoon(BrowserThread::WEBKIT, FROM_HERE, obj))
@@ -285,11 +289,12 @@ void IndexedDBDispatcherHost::OnIDBFactoryOpen(
return;
}
+ DCHECK(kDatabaseQuota == params.maximum_size_);
Context()->GetIDBFactory()->open(
params.name_, params.description_,
new IndexedDBCallbacks<WebIDBDatabase>(this, params.response_id_),
WebSecurityOrigin::createFromDatabaseIdentifier(params.origin_), NULL,
- webkit_glue::FilePathToWebString(indexed_db_path));
+ webkit_glue::FilePathToWebString(indexed_db_path), kDatabaseQuota);
}
//////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | chrome/common/render_messages_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698