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

Side by Side Diff: ipc/ipc_sync_channel.h

Issue 455011: Don't use any member variables when sending a sync call... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_SENDER_H__ 5 #ifndef IPC_IPC_SYNC_SENDER_H__
6 #define IPC_IPC_SYNC_SENDER_H__ 6 #define IPC_IPC_SYNC_SENDER_H__
7 7
8 #include <string> 8 #include <string>
9 #include <deque> 9 #include <deque>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 private: 138 private:
139 // WaitableEventWatcher::Delegate implementation. 139 // WaitableEventWatcher::Delegate implementation.
140 virtual void OnWaitableEventSignaled(base::WaitableEvent* arg); 140 virtual void OnWaitableEventSignaled(base::WaitableEvent* arg);
141 141
142 SyncContext* sync_context() { 142 SyncContext* sync_context() {
143 return reinterpret_cast<SyncContext*>(context()); 143 return reinterpret_cast<SyncContext*>(context());
144 } 144 }
145 145
146 // Both these functions wait for a reply, timeout or process shutdown. The 146 // Both these functions wait for a reply, timeout or process shutdown. The
147 // latter one also runs a nested message loop in the meantime. 147 // latter one also runs a nested message loop in the meantime.
148 void WaitForReply(base::WaitableEvent* pump_messages_event); 148 static void WaitForReply(
149 SyncContext* context, base::WaitableEvent* pump_messages_event);
149 150
150 // Runs a nested message loop until a reply arrives, times out, or the process 151 // Runs a nested message loop until a reply arrives, times out, or the process
151 // shuts down. 152 // shuts down.
152 void WaitForReplyWithNestedMessageLoop(); 153 static void WaitForReplyWithNestedMessageLoop(SyncContext* context);
153 154
154 bool sync_messages_with_no_timeout_allowed_; 155 bool sync_messages_with_no_timeout_allowed_;
155 156
156 // Used to signal events between the IPC and listener threads. 157 // Used to signal events between the IPC and listener threads.
157 base::WaitableEventWatcher dispatch_watcher_; 158 base::WaitableEventWatcher dispatch_watcher_;
158 159
159 DISALLOW_EVIL_CONSTRUCTORS(SyncChannel); 160 DISALLOW_EVIL_CONSTRUCTORS(SyncChannel);
160 }; 161 };
161 162
162 } // namespace IPC 163 } // namespace IPC
163 164
164 #endif // IPC_IPC_SYNC_SENDER_H__ 165 #endif // IPC_IPC_SYNC_SENDER_H__
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698