| Index: net/base/run_all_unittests.cc
|
| diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc
|
| index 71dada9d0199ea2ca7295efbd35e22ee1aabf4ee..15741e459c7900fcfad6395af2f600697c56f1a1 100644
|
| --- a/net/base/run_all_unittests.cc
|
| +++ b/net/base/run_all_unittests.cc
|
| @@ -28,16 +28,20 @@
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| #include "base/message_loop.h"
|
| +#include "base/ref_counted.h"
|
| #include "base/test_suite.h"
|
| -#include "net/base/scoped_host_mapper.h"
|
| +#include "net/base/host_resolver_unittest.h"
|
|
|
| class NetTestSuite : public TestSuite {
|
| public:
|
| - NetTestSuite(int argc, char** argv) : TestSuite(argc, argv) {
|
| + NetTestSuite(int argc, char** argv)
|
| + : TestSuite(argc, argv),
|
| + host_mapper_(new net::RuleBasedHostMapper()),
|
| + scoped_host_mapper_(host_mapper_.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_mapper_->AddRule("*", "127.0.0.1");
|
| }
|
|
|
| virtual void Initialize() {
|
| @@ -56,7 +60,8 @@ class NetTestSuite : public TestSuite {
|
|
|
| private:
|
| scoped_ptr<MessageLoop> message_loop_;
|
| - net::ScopedHostMapper host_mapper_;
|
| + scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
|
| + net::ScopedHostMapper scoped_host_mapper_;
|
| };
|
|
|
| int main(int argc, char** argv) {
|
|
|