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

Unified Diff: net/proxy/proxy_service.h

Issue 13701: Use automatic memory management for URLRequestContext's members.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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/proxy/proxy_script_fetcher_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.h
===================================================================
--- net/proxy/proxy_service.h (revision 6881)
+++ net/proxy/proxy_service.h (working copy)
@@ -83,7 +83,7 @@
// This class can be used to resolve the proxy server to use when loading a
// HTTP(S) URL. It uses the given ProxyResolver to handle the actual proxy
// resolution. See ProxyResolverWinHttp for example.
-class ProxyService {
+class ProxyService : public base::RefCounted<ProxyService> {
public:
// The instance takes ownership of |resolver|.
explicit ProxyService(ProxyResolver* resolver);
@@ -138,6 +138,10 @@
// use IE's settings).
static ProxyService* Create(const ProxyInfo* pi);
+ // Create a ProxyService which fails every request, causing fallback to a
+ // direct connection. Convenience function used by unit tests.
+ static ProxyService* CreateNull();
+
// TODO(eroman): remove once WinHTTP is gone.
// Get the ProxyInfo used to create this proxy service (only used by WinHTTP).
const ProxyInfo* proxy_info() const {
« no previous file with comments | « net/proxy/proxy_script_fetcher_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698