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

Unified Diff: ipc/ipc_sync_channel.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
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 35b88a7edeb43a64ea0b37cf91b284c1ca0f8596..845eccd813d2f408d8da76ce4aeddd5ce5e2a56b 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -460,6 +460,14 @@ void SyncChannel::SetRestrictDispatchChannelGroup(int group) {
sync_context()->set_restrict_dispatch_group(group);
}
+scoped_refptr<SyncMessageFilter> SyncChannel::CreateSyncMessageFilter() {
+ scoped_refptr<SyncMessageFilter> filter = new SyncMessageFilter(
+ sync_context()->shutdown_event(),
+ sync_context()->IsChannelSendThreadSafe());
+ AddFilter(filter.get());
+ return filter;
+}
+
bool SyncChannel::Send(Message* message) {
#ifdef IPC_MESSAGE_LOG_ENABLED
std::string name;
« no previous file with comments | « ipc/ipc_sync_channel.h ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698