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

Side by Side Diff: net/udp/udp_socket_libevent.h

Issue 185293014: Bind before sandbox lockdown on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
« no previous file with comments | « net/udp/udp_server_socket.cc ('k') | net/udp/udp_socket_libevent.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 NET_UDP_UDP_SOCKET_LIBEVENT_H_ 5 #ifndef NET_UDP_UDP_SOCKET_LIBEVENT_H_
6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_ 6 #define NET_UDP_UDP_SOCKET_LIBEVENT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // will not RECEIVE the loopback packets; while on Unix-like systems, the 156 // will not RECEIVE the loopback packets; while on Unix-like systems, the
157 // applications with loopback off will not SEND the loopback packets to 157 // applications with loopback off will not SEND the loopback packets to
158 // other applications on the same host. See MSDN: http://goo.gl/6vqbj 158 // other applications on the same host. See MSDN: http://goo.gl/6vqbj
159 int SetMulticastLoopbackMode(bool loopback); 159 int SetMulticastLoopbackMode(bool loopback);
160 160
161 // Set the differentiated services flags on outgoing packets. May not 161 // Set the differentiated services flags on outgoing packets. May not
162 // do anything on some platforms. 162 // do anything on some platforms.
163 // Return a network error code. 163 // Return a network error code.
164 int SetDiffServCodePoint(DiffServCodePoint dscp); 164 int SetDiffServCodePoint(DiffServCodePoint dscp);
165 165
166 // Resets the thread to be used for thread-safety checks.
167 void DetachFromThread();
168
166 private: 169 private:
167 enum SocketOptions { 170 enum SocketOptions {
168 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, 171 SOCKET_OPTION_REUSE_ADDRESS = 1 << 0,
169 SOCKET_OPTION_BROADCAST = 1 << 1, 172 SOCKET_OPTION_BROADCAST = 1 << 1,
170 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2 173 SOCKET_OPTION_MULTICAST_LOOP = 1 << 2
171 }; 174 };
172 175
173 class ReadWatcher : public base::MessageLoopForIO::Watcher { 176 class ReadWatcher : public base::MessageLoopForIO::Watcher {
174 public: 177 public:
175 explicit ReadWatcher(UDPSocketLibevent* socket) : socket_(socket) {} 178 explicit ReadWatcher(UDPSocketLibevent* socket) : socket_(socket) {}
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 CompletionCallback write_callback_; 291 CompletionCallback write_callback_;
289 292
290 BoundNetLog net_log_; 293 BoundNetLog net_log_;
291 294
292 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent); 295 DISALLOW_COPY_AND_ASSIGN(UDPSocketLibevent);
293 }; 296 };
294 297
295 } // namespace net 298 } // namespace net
296 299
297 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_ 300 #endif // NET_UDP_UDP_SOCKET_LIBEVENT_H_
OLDNEW
« no previous file with comments | « net/udp/udp_server_socket.cc ('k') | net/udp/udp_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698