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

Unified Diff: chrome/browser/net/resolve_proxy_msg_helper_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 | « chrome/browser/net/resolve_proxy_msg_helper.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/resolve_proxy_msg_helper_unittest.cc
===================================================================
--- chrome/browser/net/resolve_proxy_msg_helper_unittest.cc (revision 23574)
+++ chrome/browser/net/resolve_proxy_msg_helper_unittest.cc (working copy)
@@ -54,10 +54,11 @@
// Issue three sequential requests -- each should succeed.
TEST(ResolveProxyMsgHelperTest, Sequential) {
net::MockAsyncProxyResolver* resolver = new net::MockAsyncProxyResolver;
- net::ProxyService service(new MockProxyConfigService, resolver);
+ scoped_refptr<net::ProxyService> service(
+ new net::ProxyService(new MockProxyConfigService, resolver));
MyDelegate delegate;
- ResolveProxyMsgHelper helper(&delegate, &service);
+ ResolveProxyMsgHelper helper(&delegate, service);
GURL url1("http://www.google1.com/");
GURL url2("http://www.google2.com/");
@@ -116,10 +117,11 @@
// Issue a request while one is already in progress -- should be queued.
TEST(ResolveProxyMsgHelperTest, QueueRequests) {
net::MockAsyncProxyResolver* resolver = new net::MockAsyncProxyResolver;
- net::ProxyService service(new MockProxyConfigService, resolver);
+ scoped_refptr<net::ProxyService> service(
+ new net::ProxyService(new MockProxyConfigService, resolver));
MyDelegate delegate;
- ResolveProxyMsgHelper helper(&delegate, &service);
+ ResolveProxyMsgHelper helper(&delegate, service);
GURL url1("http://www.google1.com/");
GURL url2("http://www.google2.com/");
@@ -182,11 +184,12 @@
// Delete the helper while a request is in progress, and others are pending.
TEST(ResolveProxyMsgHelperTest, CancelPendingRequests) {
net::MockAsyncProxyResolver* resolver = new net::MockAsyncProxyResolver;
- net::ProxyService service(new MockProxyConfigService, resolver);
+ scoped_refptr<net::ProxyService> service(
+ new net::ProxyService(new MockProxyConfigService, resolver));
MyDelegate delegate;
scoped_ptr<ResolveProxyMsgHelper> helper(
- new ResolveProxyMsgHelper(&delegate, &service));
+ new ResolveProxyMsgHelper(&delegate, service));
GURL url1("http://www.google1.com/");
GURL url2("http://www.google2.com/");
« no previous file with comments | « chrome/browser/net/resolve_proxy_msg_helper.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698