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

Unified Diff: content/browser/indexed_db/indexed_db_factory_impl.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_factory_impl.cc
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory_impl.cc
index f25989dcfa1326f4a3ccdd6a467d431ed6aa1bfe..b8a553642a56f9d7861bae6025756eee0c78b383 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -213,14 +213,15 @@ void IndexedDBFactoryImpl::DeleteDatabase(
scoped_refptr<net::URLRequestContextGetter> request_context_getter,
scoped_refptr<IndexedDBCallbacks> callbacks,
const Origin& origin,
- const base::FilePath& data_directory) {
+ const base::FilePath& data_directory,
+ bool force_close) {
IDB_TRACE("IndexedDBFactoryImpl::DeleteDatabase");
IndexedDBDatabase::Identifier unique_identifier(origin, name);
const auto& it = database_map_.find(unique_identifier);
if (it != database_map_.end()) {
// If there are any connections to the database, directly delete the
// database.
- it->second->DeleteDatabase(callbacks);
+ it->second->DeleteDatabase(callbacks, force_close);
return;
}
@@ -282,7 +283,7 @@ void IndexedDBFactoryImpl::DeleteDatabase(
database_map_[unique_identifier] = database.get();
origin_dbs_.insert(std::make_pair(origin, database.get()));
- database->DeleteDatabase(callbacks);
+ database->DeleteDatabase(callbacks, force_close);
RemoveDatabaseFromMaps(unique_identifier);
database = NULL;
backing_store = NULL;

Powered by Google App Engine
This is Rietveld 408576698