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

Side by Side Diff: net/base/tcp_client_socket.h

Issue 19515: In rare cases (when running inside QEMU), the event... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/tcp_client_socket_win.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 NET_BASE_TCP_CLIENT_SOCKET_H_ 5 #ifndef NET_BASE_TCP_CLIENT_SOCKET_H_
6 #define NET_BASE_TCP_CLIENT_SOCKET_H_ 6 #define NET_BASE_TCP_CLIENT_SOCKET_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 NOT_WAITING, 79 NOT_WAITING,
80 WAITING_CONNECT, 80 WAITING_CONNECT,
81 WAITING_READ, 81 WAITING_READ,
82 WAITING_WRITE 82 WAITING_WRITE
83 }; 83 };
84 WaitState wait_state_; 84 WaitState wait_state_;
85 85
86 // base::ObjectWatcher::Delegate methods: 86 // base::ObjectWatcher::Delegate methods:
87 virtual void OnObjectSignaled(HANDLE object); 87 virtual void OnObjectSignaled(HANDLE object);
88 88
89 // After a Winsock function succeeds synchronously, waits for the
eroman 2009/01/30 21:44:46 This should probably be wrapped in a: #if defined
wtc 2009/01/30 21:48:06 Yes, this is a Windows-specific method. It is alr
eroman 2009/01/30 21:55:17 Oh right, didn't notice! LGTM.
90 // (manual-reset) event object to become signaled and resets it.
91 //
92 // Our testing shows that except in rare cases (when running inside QEMU),
93 // the event object is already signaled at this point, so we just call this
94 // method on the IO thread to avoid a context switch.
95 void WaitForAndResetEvent();
96
89 OVERLAPPED overlapped_; 97 OVERLAPPED overlapped_;
90 WSABUF buffer_; 98 WSABUF buffer_;
91 99
92 base::ObjectWatcher watcher_; 100 base::ObjectWatcher watcher_;
93 101
94 void DidCompleteIO(); 102 void DidCompleteIO();
95 #elif defined(OS_POSIX) 103 #elif defined(OS_POSIX)
96 // Whether we're currently waiting for connect() to complete 104 // Whether we're currently waiting for connect() to complete
97 bool waiting_connect_; 105 bool waiting_connect_;
98 106
(...skipping 25 matching lines...) Expand all
124 132
125 int CreateSocket(const struct addrinfo* ai); 133 int CreateSocket(const struct addrinfo* ai);
126 void DoCallback(int rv); 134 void DoCallback(int rv);
127 void DidCompleteConnect(); 135 void DidCompleteConnect();
128 }; 136 };
129 137
130 } // namespace net 138 } // namespace net
131 139
132 #endif // NET_BASE_TCP_CLIENT_SOCKET_H_ 140 #endif // NET_BASE_TCP_CLIENT_SOCKET_H_
133 141
OLDNEW
« no previous file with comments | « no previous file | net/base/tcp_client_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698