diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-29 03:18:43 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-29 03:18:43 +0000 |
commit | cf2c1b8b3402770cdb22f25137a8676e13c783fc (patch) | |
tree | 35ce15a9a7fead759996df8aed3936a76afaae18 /chrome/utility/local_discovery/service_discovery_message_handler.cc | |
parent | 5de189ab9559f589eebce0c4420d11b91c9b4a7e (diff) | |
download | chromium_src-cf2c1b8b3402770cdb22f25137a8676e13c783fc.zip chromium_src-cf2c1b8b3402770cdb22f25137a8676e13c783fc.tar.gz chromium_src-cf2c1b8b3402770cdb22f25137a8676e13c783fc.tar.bz2 |
PlatformSocketFactory integrated with libevent sockets.
BUG=277654
Review URL: https://chromiumcodereview.appspot.com/23474004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility/local_discovery/service_discovery_message_handler.cc')
-rw-r--r-- | chrome/utility/local_discovery/service_discovery_message_handler.cc | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/chrome/utility/local_discovery/service_discovery_message_handler.cc b/chrome/utility/local_discovery/service_discovery_message_handler.cc index d506c2b..d07abeb 100644 --- a/chrome/utility/local_discovery/service_discovery_message_handler.cc +++ b/chrome/utility/local_discovery/service_discovery_message_handler.cc @@ -7,18 +7,12 @@ #include <algorithm> #include "base/command_line.h" +#include "base/lazy_instance.h" #include "chrome/common/local_discovery/local_discovery_messages.h" #include "chrome/utility/local_discovery/service_discovery_client_impl.h" #include "content/public/common/content_switches.h" #include "content/public/utility/utility_thread.h" - -#if defined(OS_WIN) - -#include "base/lazy_instance.h" -#include "net/base/winsock_init.h" -#include "net/base/winsock_util.h" - -#endif // OS_WIN +#include "net/socket/socket_descriptor.h" namespace local_discovery { @@ -37,11 +31,8 @@ class SocketFactory : public net::PlatformSocketFactory { SocketFactory() : socket_v4_(NULL), socket_v6_(NULL) { - net::EnsureWinsockInit(); - socket_v4_ = WSASocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 0, - WSA_FLAG_OVERLAPPED); - socket_v6_ = WSASocket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP, NULL, 0, - WSA_FLAG_OVERLAPPED); + socket_v4_ = net::CreatePlatformSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + socket_v6_ = net::CreatePlatformSocket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); } void Reset() { |