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

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

Issue 2500263003: Port messages sent by WebIDBCursorImpl to Mojo. (Closed)
Patch Set: Address dcheng@'s comments. Created 4 years, 1 month 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_database_callbacks_impl.cc
diff --git a/content/child/indexed_db/indexed_db_database_callbacks_impl.cc b/content/child/indexed_db/indexed_db_database_callbacks_impl.cc
index 1ae0b2d03d64e80d95b4d7f95755185968298873..984792ffa4638c692498bcb887f02c90f9fbb5d0 100644
--- a/content/child/indexed_db/indexed_db_database_callbacks_impl.cc
+++ b/content/child/indexed_db/indexed_db_database_callbacks_impl.cc
@@ -5,7 +5,6 @@
#include "content/child/indexed_db/indexed_db_database_callbacks_impl.h"
#include "content/child/indexed_db/indexed_db_dispatcher.h"
-#include "content/child/thread_safe_sender.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h"
#include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseError.h"
@@ -15,11 +14,9 @@ namespace content {
namespace {
-void DeleteDatabaseCallbacks(WebIDBDatabaseCallbacks* callbacks,
- ThreadSafeSender* thread_safe_sender) {
- IndexedDBDispatcher* dispatcher =
- IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender);
- dispatcher->UnregisterMojoOwnedDatabaseCallbacks(callbacks);
+void DeleteDatabaseCallbacks(WebIDBDatabaseCallbacks* callbacks) {
+ IndexedDBDispatcher::ThreadSpecificInstance()
+ ->UnregisterMojoOwnedDatabaseCallbacks(callbacks);
delete callbacks;
}
@@ -33,20 +30,16 @@ void BuildErrorAndAbort(WebIDBDatabaseCallbacks* callbacks,
} // namespace
IndexedDBDatabaseCallbacksImpl::IndexedDBDatabaseCallbacksImpl(
- std::unique_ptr<WebIDBDatabaseCallbacks> callbacks,
- scoped_refptr<ThreadSafeSender> thread_safe_sender)
+ std::unique_ptr<WebIDBDatabaseCallbacks> callbacks)
: callback_runner_(base::ThreadTaskRunnerHandle::Get()),
- thread_safe_sender_(thread_safe_sender),
callbacks_(callbacks.release()) {
- IndexedDBDispatcher* dispatcher =
- IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get());
- dispatcher->RegisterMojoOwnedDatabaseCallbacks(callbacks_);
+ IndexedDBDispatcher::ThreadSpecificInstance()
+ ->RegisterMojoOwnedDatabaseCallbacks(callbacks_);
}
IndexedDBDatabaseCallbacksImpl::~IndexedDBDatabaseCallbacksImpl() {
- callback_runner_->PostTask(
- FROM_HERE, base::Bind(&DeleteDatabaseCallbacks, callbacks_,
- base::RetainedRef(thread_safe_sender_)));
+ callback_runner_->PostTask(FROM_HERE,
+ base::Bind(&DeleteDatabaseCallbacks, callbacks_));
}
void IndexedDBDatabaseCallbacksImpl::ForcedClose() {
« no previous file with comments | « content/child/indexed_db/indexed_db_database_callbacks_impl.h ('k') | content/child/indexed_db/indexed_db_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698