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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 165430: Reference count ProxyService.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Sync Created 11 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 | « net/http/http_network_session.h ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
===================================================================
--- net/http/http_network_transaction_unittest.cc (revision 23574)
+++ net/http/http_network_transaction_unittest.cc (working copy)
@@ -43,7 +43,7 @@
: host_resolver(new MockHostResolver), proxy_service(proxy_service) {}
scoped_refptr<MockHostResolverBase> host_resolver;
- scoped_ptr<ProxyService> proxy_service;
+ scoped_refptr<ProxyService> proxy_service;
MockClientSocketFactory socket_factory;
};
@@ -56,7 +56,7 @@
HttpNetworkSession* CreateSession(SessionDependencies* session_deps) {
return new HttpNetworkSession(session_deps->host_resolver,
- session_deps->proxy_service.get(),
+ session_deps->proxy_service,
&session_deps->socket_factory);
}
@@ -3053,9 +3053,8 @@
}
TEST_F(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) {
- SessionDependencies session_deps;
- session_deps.proxy_service.reset(CreateFixedProxyService(
- "socks4://myproxy:1080"));
+ SessionDependencies session_deps(
+ CreateFixedProxyService("socks4://myproxy:1080"));
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(
@@ -3106,9 +3105,8 @@
}
TEST_F(HttpNetworkTransactionTest, SOCKS4_SSL_GET) {
- SessionDependencies session_deps;
- session_deps.proxy_service.reset(CreateFixedProxyService(
- "socks4://myproxy:1080"));
+ SessionDependencies session_deps(
+ CreateFixedProxyService("socks4://myproxy:1080"));
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(
@@ -3164,9 +3162,8 @@
}
TEST_F(HttpNetworkTransactionTest, SOCKS5_HTTP_GET) {
- SessionDependencies session_deps;
- session_deps.proxy_service.reset(CreateFixedProxyService(
- "socks5://myproxy:1080"));
+ SessionDependencies session_deps(
+ CreateFixedProxyService("socks5://myproxy:1080"));
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(
@@ -3223,9 +3220,8 @@
}
TEST_F(HttpNetworkTransactionTest, SOCKS5_SSL_GET) {
- SessionDependencies session_deps;
- session_deps.proxy_service.reset(CreateFixedProxyService(
- "socks5://myproxy:1080"));
+ SessionDependencies session_deps(
+ CreateFixedProxyService("socks5://myproxy:1080"));
scoped_ptr<HttpTransaction> trans(
new HttpNetworkTransaction(
@@ -3327,9 +3323,8 @@
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
- SessionDependencies session_deps;
- session_deps.proxy_service.reset(CreateFixedProxyService(
- tests[i].proxy_server));
+ SessionDependencies session_deps(
+ CreateFixedProxyService(tests[i].proxy_server));
scoped_refptr<CaptureGroupNameSocketPool> conn_pool(
new CaptureGroupNameSocketPool());
« no previous file with comments | « net/http/http_network_session.h ('k') | net/proxy/proxy_script_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698