summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 17:38:12 +0000
committerdanno@chromium.org <danno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-10 17:38:12 +0000
commit63b3a650eea6563d391e4a445f46decf65ce9259 (patch)
tree7d943da1c5339bc8d1acb09842fd007d019446f5
parentecdc9d4c11a997c23b2e8cbb588732ceea823047 (diff)
downloadchromium_src-63b3a650eea6563d391e4a445f46decf65ce9259.zip
chromium_src-63b3a650eea6563d391e4a445f46decf65ce9259.tar.gz
chromium_src-63b3a650eea6563d391e4a445f46decf65ce9259.tar.bz2
Fix memory leak in connection_tester_unittest.cc
Original CL: http://codereview.chromium.org/4651005/ BUG=None TEST=ConnectionTesterTest* should no longer exhibit memory leaks Review URL: http://codereview.chromium.org/4723004 Patch from Jakob Kummerow <jkummerow@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65679 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/net/connection_tester_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/net/connection_tester_unittest.cc b/chrome/browser/net/connection_tester_unittest.cc
index af505d8..5bab81e 100644
--- a/chrome/browser/net/connection_tester_unittest.cc
+++ b/chrome/browser/net/connection_tester_unittest.cc
@@ -77,7 +77,8 @@ class ConnectionTesterTest : public PlatformTest {
: test_server_(net::TestServer::TYPE_HTTP,
FilePath(FILE_PATH_LITERAL("net/data/url_request_unittest"))),
message_loop_(MessageLoop::TYPE_IO),
- io_thread_(new TestingPrefService()) {
+ pref_service(new TestingPrefService()),
+ io_thread_(pref_service.get()) {
scoped_refptr<net::RuleBasedHostResolverProc> catchall_resolver(
new net::RuleBasedHostResolverProc(NULL));
@@ -91,6 +92,7 @@ class ConnectionTesterTest : public PlatformTest {
net::TestServer test_server_;
ConnectionTesterDelegate test_delegate_;
MessageLoop message_loop_;
+ scoped_ptr<PrefService> pref_service;
IOThread io_thread_; // Needed for creating ProxyScriptFetchers.
};