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

Unified Diff: net/http/http_proxy_client_socket_pool.h

Issue 3039028: Make HttpAuthController not reference counted. (Closed)
Patch Set: Created 10 years, 5 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_proxy_client_socket.cc ('k') | net/http/http_proxy_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_client_socket_pool.h
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index afe7d19d228548164ac39e41069d5a56502d35ea..09a64772c123c9927d5d1e720115a79e163a5a36 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -28,21 +28,26 @@ class HttpAuthController;
class HttpProxySocketParams : public base::RefCounted<HttpProxySocketParams> {
public:
+ // Takes ownership of |auth_controller|.
HttpProxySocketParams(const scoped_refptr<TCPSocketParams>& proxy_server,
const GURL& request_url, HostPortPair endpoint,
- scoped_refptr<HttpAuthController> auth_controller,
- bool tunnel);
+ HttpAuthController* auth_controller, bool tunnel);
const scoped_refptr<TCPSocketParams>& tcp_params() const {
return tcp_params_;
}
const GURL& request_url() const { return request_url_; }
const HostPortPair& endpoint() const { return endpoint_; }
- const scoped_refptr<HttpAuthController>& auth_controller() {
- return auth_controller_;
+ HttpAuthController* ReleaseAuthController() {
+ return auth_controller_.release();
}
bool tunnel() const { return tunnel_; }
+ // Takes ownership of |auth_controller|.
+ void set_auth_controller(HttpAuthController* auth_controller) {
+ auth_controller_.reset(auth_controller);
+ }
+
private:
friend class base::RefCounted<HttpProxySocketParams>;
~HttpProxySocketParams();
@@ -50,7 +55,7 @@ class HttpProxySocketParams : public base::RefCounted<HttpProxySocketParams> {
const scoped_refptr<TCPSocketParams> tcp_params_;
const GURL request_url_;
const HostPortPair endpoint_;
- const scoped_refptr<HttpAuthController> auth_controller_;
+ scoped_ptr<HttpAuthController> auth_controller_;
const bool tunnel_;
DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams);
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/http_proxy_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698