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

Unified Diff: net/base/run_all_unittests.cc

Issue 149511: Refactorings surrounding HostResolver:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Merge in socks5_client_socket_unittest.cc Created 11 years, 5 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 | « net/base/mock_host_resolver.cc ('k') | net/ftp/ftp_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/run_all_unittests.cc
===================================================================
--- net/base/run_all_unittests.cc (revision 20760)
+++ net/base/run_all_unittests.cc (working copy)
@@ -30,7 +30,7 @@
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/test_suite.h"
-#include "net/base/host_resolver_unittest.h"
+#include "net/base/mock_host_resolver.h"
class NetTestSuite : public TestSuite {
public:
@@ -40,12 +40,12 @@
virtual void Initialize() {
TestSuite::Initialize();
- host_mapper_ = new net::RuleBasedHostMapper();
- scoped_host_mapper_.Init(host_mapper_.get());
+ host_resolver_proc_ = new net::RuleBasedHostResolverProc(NULL);
+ scoped_host_resolver_proc_.Init(host_resolver_proc_.get());
// In case any attempts are made to resolve host names, force them all to
// be mapped to localhost. This prevents DNS queries from being sent in
// the process of running these unit tests.
- host_mapper_->AddRule("*", "127.0.0.1");
+ host_resolver_proc_->AddRule("*", "127.0.0.1");
message_loop_.reset(new MessageLoopForIO());
}
@@ -60,8 +60,8 @@
private:
scoped_ptr<MessageLoop> message_loop_;
- scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
- net::ScopedHostMapper scoped_host_mapper_;
+ scoped_refptr<net::RuleBasedHostResolverProc> host_resolver_proc_;
+ net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_;
};
int main(int argc, char** argv) {
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | net/ftp/ftp_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698