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

Unified Diff: content/child/indexed_db/indexed_db_message_filter.cc

Issue 17955002: Fix IndexedDB after r208777. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix unittests Created 7 years, 6 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/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));
}
« no previous file with comments | « content/child/indexed_db/indexed_db_message_filter.h ('k') | content/child/indexed_db/proxy_webidbcursor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698