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

Unified Diff: content/common/indexed_db/indexed_db_dispatcher.cc

Issue 10695158: IndexedDB: Close open databases when user requests browsing data deletion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove const from iterator (not sure how this slipped through) Created 8 years, 3 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 | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index 8981c2c9a45462ffd18b45f92715394062c1e047..479bf9404b561a6a95720ff2e506b6e9b83da7e1 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -107,6 +107,8 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksUpgradeNeeded, OnUpgradeNeeded)
IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksAbort, OnAbort)
IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksComplete, OnComplete)
+ IPC_MESSAGE_HANDLER(IndexedDBMsg_DatabaseCallbacksForcedClose,
+ OnForcedClose)
IPC_MESSAGE_HANDLER(IndexedDBMsg_DatabaseCallbacksIntVersionChange,
OnIntVersionChange)
IPC_MESSAGE_HANDLER(IndexedDBMsg_DatabaseCallbacksVersionChange,
@@ -742,6 +744,16 @@ void IndexedDBDispatcher::OnComplete(int32 thread_id, int32 transaction_id) {
pending_transaction_callbacks_.Remove(transaction_id);
}
+void IndexedDBDispatcher::OnForcedClose(int32 thread_id,
+ int32 database_id) {
+ DCHECK_EQ(thread_id, CurrentWorkerId());
+ WebIDBDatabaseCallbacks* callbacks =
+ pending_database_callbacks_.Lookup(database_id);
+ if (!callbacks)
+ return;
+ callbacks->onForcedClose();
+}
+
void IndexedDBDispatcher::OnIntVersionChange(int32 thread_id,
int32 database_id,
int64 old_version,
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698