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

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

Issue 1262253004: Let IPC::SyncMessageFilter take advantage of thread-safe Send. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minus some code Created 5 years, 4 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/webidbcursor_impl_unittest.cc
diff --git a/content/child/indexed_db/webidbcursor_impl_unittest.cc b/content/child/indexed_db/webidbcursor_impl_unittest.cc
index a21babd8b8c20e063eaa3819dfd319bf0bff25d8..69fa803b9fe4dc84d4b34edf38b2037a2ee4772a 100644
--- a/content/child/indexed_db/webidbcursor_impl_unittest.cc
+++ b/content/child/indexed_db/webidbcursor_impl_unittest.cc
@@ -115,15 +115,23 @@ class MockContinueCallbacks : public WebIDBCallbacks {
WebVector<WebBlobInfo>* web_blob_info_;
};
+class MockSyncMessageFilter : public IPC::SyncMessageFilter {
+ public:
+ MockSyncMessageFilter()
+ : SyncMessageFilter(nullptr, false /* is_channel_send_thread_safe */) {}
+
+ private:
+ ~MockSyncMessageFilter() override {}
+};
+
} // namespace
class WebIDBCursorImplTest : public testing::Test {
public:
WebIDBCursorImplTest() {
null_key_.assignNull();
- sync_message_filter_ = new IPC::SyncMessageFilter(NULL);
thread_safe_sender_ = new ThreadSafeSender(
- base::ThreadTaskRunnerHandle::Get(), sync_message_filter_.get());
+ base::ThreadTaskRunnerHandle::Get(), new MockSyncMessageFilter);
dispatcher_ =
make_scoped_ptr(new MockDispatcher(thread_safe_sender_.get()));
}
@@ -135,8 +143,6 @@ class WebIDBCursorImplTest : public testing::Test {
scoped_ptr<MockDispatcher> dispatcher_;
private:
- scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
-
DISALLOW_COPY_AND_ASSIGN(WebIDBCursorImplTest);
};
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher_unittest.cc ('k') | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698