diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-02 20:40:27 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-02 20:40:27 +0000 |
commit | 87bb0cede643624622da4c68f41d50497a98a126 (patch) | |
tree | 3bc86b0380b5ed670d3c3215e1b21a1681e42e4e /net/udp/udp_socket_win.cc | |
parent | 35d9cb23b3359d47f180b6111e7d162e81889e6d (diff) | |
download | chromium_src-87bb0cede643624622da4c68f41d50497a98a126.zip chromium_src-87bb0cede643624622da4c68f41d50497a98a126.tar.gz chromium_src-87bb0cede643624622da4c68f41d50497a98a126.tar.bz2 |
Added PlatformSocketFactory to override WSASocket calls.
This allows to run mDns code in sandbox by replacing WSASocket with pre-created sockets.
Current design of UDPSocket combines WSASocket and bind. But WSASocket must be called outside of sandbox when bind can be called inside of sandbox. So probably this factory is simplest way to make it work in sandbox without changing UDPSocket API.
BUG=245391
Review URL: https://chromiumcodereview.appspot.com/17706004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/udp/udp_socket_win.cc')
-rw-r--r-- | net/udp/udp_socket_win.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/udp/udp_socket_win.cc b/net/udp/udp_socket_win.cc index c3fd561..fe97d0b 100644 --- a/net/udp/udp_socket_win.cc +++ b/net/udp/udp_socket_win.cc @@ -358,8 +358,7 @@ int UDPSocketWin::Bind(const IPEndPoint& address) { int UDPSocketWin::CreateSocket(const IPEndPoint& address) { addr_family_ = address.GetSockAddrFamily(); - socket_ = WSASocket(addr_family_, SOCK_DGRAM, IPPROTO_UDP, - NULL, 0, WSA_FLAG_OVERLAPPED); + socket_ = CreatePlatformSocket(addr_family_, SOCK_DGRAM, IPPROTO_UDP); if (socket_ == INVALID_SOCKET) return MapSystemError(WSAGetLastError()); core_ = new Core(this); |