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

Side by Side Diff: ipc/ipc_channel_proxy.h

Issue 194923004: Revert of Eliminate a potential race in IPC::ChannelProxy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « ipc/ipc_channel_nacl.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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void AddFilter(MessageFilter* filter); 226 void AddFilter(MessageFilter* filter);
227 void OnDispatchConnected(); 227 void OnDispatchConnected();
228 void OnDispatchError(); 228 void OnDispatchError();
229 229
230 scoped_refptr<base::SingleThreadTaskRunner> listener_task_runner_; 230 scoped_refptr<base::SingleThreadTaskRunner> listener_task_runner_;
231 Listener* listener_; 231 Listener* listener_;
232 232
233 // List of filters. This is only accessed on the IPC thread. 233 // List of filters. This is only accessed on the IPC thread.
234 std::vector<scoped_refptr<MessageFilter> > filters_; 234 std::vector<scoped_refptr<MessageFilter> > filters_;
235 scoped_refptr<base::SingleThreadTaskRunner> ipc_task_runner_; 235 scoped_refptr<base::SingleThreadTaskRunner> ipc_task_runner_;
236
237 // Note, channel_ may be set on the Listener thread or the IPC thread.
238 // But once it has been set, it must only be read or cleared on the IPC
239 // thread.
240 scoped_ptr<Channel> channel_; 236 scoped_ptr<Channel> channel_;
241 std::string channel_id_; 237 std::string channel_id_;
242 bool channel_connected_called_; 238 bool channel_connected_called_;
243 239
244 // Routes a given message to a proper subset of |filters_|, depending 240 // Routes a given message to a proper subset of |filters_|, depending
245 // on which message classes a filter might support. 241 // on which message classes a filter might support.
246 class MessageFilterRouter; 242 class MessageFilterRouter;
247 scoped_ptr<MessageFilterRouter> message_filter_router_; 243 scoped_ptr<MessageFilterRouter> message_filter_router_;
248 244
249 // Holds filters between the AddFilter call on the listerner thread and the 245 // Holds filters between the AddFilter call on the listerner thread and the
(...skipping 17 matching lines...) Expand all
267 // that involves this data. 263 // that involves this data.
268 scoped_refptr<Context> context_; 264 scoped_refptr<Context> context_;
269 265
270 // Whether the channel has been initialized. 266 // Whether the channel has been initialized.
271 bool did_init_; 267 bool did_init_;
272 }; 268 };
273 269
274 } // namespace IPC 270 } // namespace IPC
275 271
276 #endif // IPC_IPC_CHANNEL_PROXY_H_ 272 #endif // IPC_IPC_CHANNEL_PROXY_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_nacl.cc ('k') | ipc/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698