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

Side by Side Diff: ipc/ipc_channel_proxy.h

Issue 183553004: Eliminate a potential race in IPC::ChannelProxy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: merge 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.
236 scoped_ptr<Channel> channel_; 240 scoped_ptr<Channel> channel_;
237 std::string channel_id_; 241 std::string channel_id_;
238 bool channel_connected_called_; 242 bool channel_connected_called_;
239 243
240 // Routes a given message to a proper subset of |filters_|, depending 244 // Routes a given message to a proper subset of |filters_|, depending
241 // on which message classes a filter might support. 245 // on which message classes a filter might support.
242 class MessageFilterRouter; 246 class MessageFilterRouter;
243 scoped_ptr<MessageFilterRouter> message_filter_router_; 247 scoped_ptr<MessageFilterRouter> message_filter_router_;
244 248
245 // Holds filters between the AddFilter call on the listerner thread and the 249 // Holds filters between the AddFilter call on the listerner thread and the
(...skipping 17 matching lines...) Expand all
263 // that involves this data. 267 // that involves this data.
264 scoped_refptr<Context> context_; 268 scoped_refptr<Context> context_;
265 269
266 // Whether the channel has been initialized. 270 // Whether the channel has been initialized.
267 bool did_init_; 271 bool did_init_;
268 }; 272 };
269 273
270 } // namespace IPC 274 } // namespace IPC
271 275
272 #endif // IPC_IPC_CHANNEL_PROXY_H_ 276 #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