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

Side by Side Diff: ipc/ipc_channel_proxy.h

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 unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/queue_message_swap_promise_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_CHANNEL_PROXY_H_ 5 #ifndef IPC_IPC_CHANNEL_PROXY_H_
6 #define IPC_IPC_CHANNEL_PROXY_H_ 6 #define IPC_IPC_CHANNEL_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return ipc_task_runner_.get(); 180 return ipc_task_runner_.get();
181 } 181 }
182 const std::string& channel_id() const { return channel_id_; } 182 const std::string& channel_id() const { return channel_id_; }
183 183
184 // Dispatches a message on the listener thread. 184 // Dispatches a message on the listener thread.
185 void OnDispatchMessage(const Message& message); 185 void OnDispatchMessage(const Message& message);
186 186
187 // Sends |message| from appropriate thread. 187 // Sends |message| from appropriate thread.
188 void Send(Message* message); 188 void Send(Message* message);
189 189
190 // Indicates if the underlying channel's Send is thread-safe.
191 bool IsChannelSendThreadSafe() const;
192
190 protected: 193 protected:
191 friend class base::RefCountedThreadSafe<Context>; 194 friend class base::RefCountedThreadSafe<Context>;
192 ~Context() override; 195 ~Context() override;
193 196
194 // IPC::Listener methods: 197 // IPC::Listener methods:
195 bool OnMessageReceived(const Message& message) override; 198 bool OnMessageReceived(const Message& message) override;
196 void OnChannelConnected(int32 peer_pid) override; 199 void OnChannelConnected(int32 peer_pid) override;
197 void OnChannelError() override; 200 void OnChannelError() override;
198 201
199 // Like OnMessageReceived but doesn't try the filters. 202 // Like OnMessageReceived but doesn't try the filters.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 bool did_init_; 301 bool did_init_;
299 302
300 #if defined(ENABLE_IPC_FUZZER) 303 #if defined(ENABLE_IPC_FUZZER)
301 OutgoingMessageFilter* outgoing_message_filter_; 304 OutgoingMessageFilter* outgoing_message_filter_;
302 #endif 305 #endif
303 }; 306 };
304 307
305 } // namespace IPC 308 } // namespace IPC
306 309
307 #endif // IPC_IPC_CHANNEL_PROXY_H_ 310 #endif // IPC_IPC_CHANNEL_PROXY_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/queue_message_swap_promise_unittest.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698