diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 22:15:40 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 22:15:40 +0000 |
commit | 2a877b9e053158fe2919068d40a9d63760a04cc3 (patch) | |
tree | 092aec31392b92cf25f0707f75ef45e64a298972 /chrome/browser | |
parent | 2599f7c41a2dab009c73b68969b50f9e4cb0a657 (diff) | |
download | chromium_src-2a877b9e053158fe2919068d40a9d63760a04cc3.zip chromium_src-2a877b9e053158fe2919068d40a9d63760a04cc3.tar.gz chromium_src-2a877b9e053158fe2919068d40a9d63760a04cc3.tar.bz2 |
Move WinSock initialize earlier in the startup process. I ran into
a case where my extension used the network; but because extensions are
initialized earlier than WinSock init, the extension failed when
trying to do a dns lookup. This only fails because it was in conjunction
with the --single-process flag, so it is unlikely to effect others.
Nonetheless, there is really no harm in moving winsock initialization
to be very early.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/454021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_main.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 5ea61f6..aaac50d 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -334,6 +334,11 @@ int BrowserMain(const MainFunctionParams& parameters) { } #endif // OS_POSIX +#if defined(OS_WIN) + // Initialize Winsock. + net::EnsureWinsockInit(); +#endif // defined(OS_WIN) + // Do platform-specific things (such as finishing initializing Cocoa) // prior to instantiating the message loop. This could be turned into a // broadcast notification. @@ -729,11 +734,6 @@ int BrowserMain(const MainFunctionParams& parameters) { // testing against a bunch of special cases that are taken care early on. PrepareRestartOnCrashEnviroment(parsed_command_line); -#if defined(OS_WIN) - // Initialize Winsock. - net::EnsureWinsockInit(); -#endif // defined(OS_WIN) - // Initialize and maintain DNS prefetcher module. chrome_browser_net::DnsPrefetcherInit dns_prefetch(user_prefs, local_state); |