diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 00:52:50 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 00:52:50 +0000 |
commit | c20610d3cba2e3eaeb01927f39cc9cc21dfa1d33 (patch) | |
tree | 7e137e9114786f2dc98869b8723c5a5ccdf3488d /third_party/libjingle/files/talk/base/win32socketserver.cc | |
parent | dac3823fca2dd4d2b0aa2184ef918d27cfb536e6 (diff) | |
download | chromium_src-c20610d3cba2e3eaeb01927f39cc9cc21dfa1d33.zip chromium_src-c20610d3cba2e3eaeb01927f39cc9cc21dfa1d33.tar.gz chromium_src-c20610d3cba2e3eaeb01927f39cc9cc21dfa1d33.tar.bz2 |
Within libjingle, add an abstraction of winsock initialization.
When building chrome, override the default implementation so
that we share the winsock initialization singleton with net/base.
Trigger the winsock initialization lazily in a few places.
This is intended to fix a startup perf regression that appeared
when sync (and libjingle) became linked into chrome.dll, rather
than a separate delay-loaded sync dll.
BUG=24448
TEST=Verified deferred winsock initialization via debugger. Measured before and after time of the StartupTest.PerfTest. Verified sync notification still work.
Review URL: http://codereview.chromium.org/267089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libjingle/files/talk/base/win32socketserver.cc')
-rw-r--r-- | third_party/libjingle/files/talk/base/win32socketserver.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/libjingle/files/talk/base/win32socketserver.cc b/third_party/libjingle/files/talk/base/win32socketserver.cc index 49c8fee..bbec42e 100644 --- a/third_party/libjingle/files/talk/base/win32socketserver.cc +++ b/third_party/libjingle/files/talk/base/win32socketserver.cc @@ -29,6 +29,7 @@ #include "talk/base/common.h" #include "talk/base/logging.h" #include "talk/base/winping.h" +#include "talk/base/winsock_initializer.h" #include "talk/base/win32socketserver.h" #include "talk/base/win32window.h" #include <ws2tcpip.h> @@ -267,6 +268,7 @@ Win32Socket::EventSink::OnFinalMessage(HWND hWnd) { Win32Socket::Win32Socket() : socket_(INVALID_SOCKET), error_(0), state_(CS_CLOSED), signal_close_(false), sink_(NULL), dns_(NULL) { + talk_base::EnsureWinsockInit(); // TODO: replace addr_ with SocketAddress memset(&addr_, 0, sizeof(addr_)); } |