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

Unified Diff: net/base/mock_host_resolver.cc

Issue 10872104: Make sure MockHostResolverWorks regardless of whether winsock has already been initialized yet. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move to mockhostresolver Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mock_host_resolver.cc
diff --git a/net/base/mock_host_resolver.cc b/net/base/mock_host_resolver.cc
index cf288f66c87ff107e6c63973844b249abde9c557..efa7ae5349ec61d0811d97a13e78685fa2ab41c6 100644
--- a/net/base/mock_host_resolver.cc
+++ b/net/base/mock_host_resolver.cc
@@ -18,6 +18,9 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/test_completion_callback.h"
+#if defined(OS_WIN)
+#include "net/base/winsock_init.h"
+#endif
namespace net {
@@ -324,6 +327,9 @@ int RuleBasedHostResolverProc::Resolve(const std::string& host,
case Rule::kResolverTypeFail:
return ERR_NAME_NOT_RESOLVED;
case Rule::kResolverTypeSystem:
+#if defined(OS_WIN)
+ net::EnsureWinsockInit();
+#endif
return SystemHostResolverProc(effective_host,
address_family,
host_resolver_flags,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698