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

Side by Side Diff: ipc/ipc_sync_channel.h

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « extensions/test/result_catcher.h ('k') | ipc/ipc_sync_channel.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_SYNC_CHANNEL_H_ 5 #ifndef IPC_IPC_SYNC_CHANNEL_H_
6 #define IPC_IPC_SYNC_CHANNEL_H_ 6 #define IPC_IPC_SYNC_CHANNEL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, 218 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
219 base::WaitableEvent* shutdown_event); 219 base::WaitableEvent* shutdown_event);
220 220
221 void OnDispatchEventSignaled(base::WaitableEvent* event); 221 void OnDispatchEventSignaled(base::WaitableEvent* event);
222 222
223 SyncContext* sync_context() { 223 SyncContext* sync_context() {
224 return reinterpret_cast<SyncContext*>(context()); 224 return reinterpret_cast<SyncContext*>(context());
225 } 225 }
226 226
227 // Both these functions wait for a reply, timeout or process shutdown. The 227 // Both these functions wait for a reply, timeout or process shutdown. The
228 // latter one also runs a nested message loop in the meantime. 228 // latter one also runs a nested run loop in the meantime.
229 static void WaitForReply(mojo::SyncHandleRegistry* registry, 229 static void WaitForReply(mojo::SyncHandleRegistry* registry,
230 SyncContext* context, 230 SyncContext* context,
231 bool pump_messages); 231 bool pump_messages);
232 232
233 // Runs a nested message loop until a reply arrives, times out, or the process 233 // Runs a nested run loop until a reply arrives, times out, or the process
234 // shuts down. 234 // shuts down.
235 static void WaitForReplyWithNestedMessageLoop(SyncContext* context); 235 static void WaitForReplyWithNestedMessageLoop(SyncContext* context);
236 236
237 // Starts the dispatch watcher. 237 // Starts the dispatch watcher.
238 void StartWatching(); 238 void StartWatching();
239 239
240 // ChannelProxy overrides: 240 // ChannelProxy overrides:
241 void OnChannelInit() override; 241 void OnChannelInit() override;
242 242
243 scoped_refptr<mojo::SyncHandleRegistry> sync_handle_registry_; 243 scoped_refptr<mojo::SyncHandleRegistry> sync_handle_registry_;
244 244
245 // Used to signal events between the IPC and listener threads. 245 // Used to signal events between the IPC and listener threads.
246 base::WaitableEventWatcher dispatch_watcher_; 246 base::WaitableEventWatcher dispatch_watcher_;
247 base::WaitableEventWatcher::EventCallback dispatch_watcher_callback_; 247 base::WaitableEventWatcher::EventCallback dispatch_watcher_callback_;
248 248
249 // Tracks SyncMessageFilters created before complete channel initialization. 249 // Tracks SyncMessageFilters created before complete channel initialization.
250 std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_; 250 std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_;
251 251
252 DISALLOW_COPY_AND_ASSIGN(SyncChannel); 252 DISALLOW_COPY_AND_ASSIGN(SyncChannel);
253 }; 253 };
254 254
255 } // namespace IPC 255 } // namespace IPC
256 256
257 #endif // IPC_IPC_SYNC_CHANNEL_H_ 257 #endif // IPC_IPC_SYNC_CHANNEL_H_
OLDNEW
« no previous file with comments | « extensions/test/result_catcher.h ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698