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

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

Issue 2642943002: Allow closing IndexedDB database before deleting (Closed)
Patch Set: Actually pass the flag Created 3 years, 11 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/indexed_db/indexed_db_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 06d2f767680ee594e866876bea4efdeb8a5a4f2c..f1663a5dc6b57e552e03365b929a9f7588911214 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -142,7 +142,8 @@ void IndexedDBDispatcherHost::Open(
void IndexedDBDispatcherHost::DeleteDatabase(
::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info,
const url::Origin& origin,
- const base::string16& name) {
+ const base::string16& name,
+ bool force_close) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!IsValidOrigin(origin)) {
@@ -154,7 +155,8 @@ void IndexedDBDispatcherHost::DeleteDatabase(
new IndexedDBCallbacks(this, origin, std::move(callbacks_info)));
indexed_db_context_->TaskRunner()->PostTask(
FROM_HERE, base::Bind(&IndexedDBDispatcherHost::DeleteDatabaseOnIDBThread,
- this, base::Passed(&callbacks), origin, name));
+ this, base::Passed(&callbacks), origin, name,
+ force_close));
}
void IndexedDBDispatcherHost::GetDatabaseNamesOnIDBThread(
@@ -195,13 +197,15 @@ void IndexedDBDispatcherHost::OpenOnIDBThread(
void IndexedDBDispatcherHost::DeleteDatabaseOnIDBThread(
scoped_refptr<IndexedDBCallbacks> callbacks,
const url::Origin& origin,
- const base::string16& name) {
+ const base::string16& name,
+ bool force_close) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
base::FilePath indexed_db_path = indexed_db_context_->data_path();
DCHECK(request_context_getter_);
context()->GetIDBFactory()->DeleteDatabase(
- name, request_context_getter_, callbacks, origin, indexed_db_path);
+ name, request_context_getter_, callbacks, origin, indexed_db_path,
+ force_close);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698