Index: content/child/indexed_db/indexed_db_message_filter.cc |
=================================================================== |
--- content/child/indexed_db/indexed_db_message_filter.cc (revision 208777) |
+++ content/child/indexed_db/indexed_db_message_filter.cc (working copy) |
@@ -9,6 +9,7 @@ |
#include "base/message_loop/message_loop_proxy.h" |
#include "base/pickle.h" |
#include "content/child/indexed_db/indexed_db_dispatcher.h" |
+#include "content/child/thread_safe_sender.h" |
#include "content/common/indexed_db/indexed_db_messages.h" |
#include "webkit/child/worker_task_runner.h" |
@@ -17,9 +18,9 @@ |
namespace content { |
IndexedDBMessageFilter::IndexedDBMessageFilter( |
- IPC::SyncMessageFilter* sync_message_filter) |
+ ThreadSafeSender* thread_safe_sender) |
: main_thread_loop_proxy_(base::MessageLoopProxy::current()), |
- sync_message_filter_(sync_message_filter) { |
+ thread_safe_sender_(thread_safe_sender) { |
} |
bool IndexedDBMessageFilter::OnMessageReceived(const IPC::Message& msg) { |
@@ -45,7 +46,8 @@ |
IndexedDBMessageFilter::~IndexedDBMessageFilter() {} |
void IndexedDBMessageFilter::DispatchMessage(const IPC::Message& msg) { |
- IndexedDBDispatcher::ThreadSpecificInstance()->OnMessageReceived(msg); |
+ IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_)-> |
+ OnMessageReceived(msg); |
} |
void IndexedDBMessageFilter::OnStaleMessageReceived(const IPC::Message& msg) { |
@@ -63,13 +65,13 @@ |
int32 ipc_database_callbacks_id, |
int32 ipc_database_id, |
const IndexedDBDatabaseMetadata& idb_metadata) { |
- sync_message_filter_->Send( |
+ thread_safe_sender_->Send( |
new IndexedDBHostMsg_DatabaseClose(ipc_database_id)); |
} |
void IndexedDBMessageFilter::OnStaleUpgradeNeeded( |
const IndexedDBMsg_CallbacksUpgradeNeeded_Params& p) { |
- sync_message_filter_->Send( |
+ thread_safe_sender_->Send( |
new IndexedDBHostMsg_DatabaseClose(p.ipc_database_id)); |
} |