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

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: 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: ipc/ipc_sync_channel.cc
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 35b88a7edeb43a64ea0b37cf91b284c1ca0f8596..6ce1e99acf4c0ad93e25b81d16e50c4abf02da5f 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<IPC::SyncMessageFilter> SyncChannel::AddNewSyncMessageFilter() {
jam 2015/08/04 23:06:41 nit: usually functions that return a new objects s
Ken Rockot(use gerrit already) 2015/08/04 23:55:44 Done.
+ scoped_refptr<IPC::SyncMessageFilter> filter = new IPC::SyncMessageFilter(
jam 2015/08/04 23:06:41 nit: no IPC::
Ken Rockot(use gerrit already) 2015/08/04 23:55:45 Done.
+ 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;

Powered by Google App Engine
This is Rietveld 408576698