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

Unified Diff: net/url_request/url_request_context_storage.h

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed two comments, fix some tests Created 5 years, 3 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
Index: net/url_request/url_request_context_storage.h
diff --git a/net/url_request/url_request_context_storage.h b/net/url_request/url_request_context_storage.h
index fd3c4a263a97c60555e85736547d5279dd286bfe..f3b60f711206ab7c34a1a537dd5703346598a9d0 100644
--- a/net/url_request/url_request_context_storage.h
+++ b/net/url_request/url_request_context_storage.h
@@ -18,6 +18,7 @@ class CookieStore;
class FtpTransactionFactory;
class HostResolver;
class HttpAuthHandlerFactory;
+class HttpNetworkSession;
class HttpServerProperties;
class HttpTransactionFactory;
class HttpUserAgentSettings;
@@ -59,6 +60,8 @@ class NET_EXPORT URLRequestContextStorage {
void set_cookie_store(CookieStore* cookie_store);
void set_transport_security_state(
TransportSecurityState* transport_security_state);
+ void set_http_network_session(
+ scoped_ptr<HttpNetworkSession> http_network_session);
void set_http_transaction_factory(
HttpTransactionFactory* http_transaction_factory);
void set_job_factory(URLRequestJobFactory* job_factory);
@@ -68,6 +71,12 @@ class NET_EXPORT URLRequestContextStorage {
HttpUserAgentSettings* http_user_agent_settings);
void set_sdch_manager(scoped_ptr<SdchManager> sdch_manager);
+ // Everything else can be access through the URLRequestContext, but this
+ // cannot. Having an accessor for it makes usage a little cleaner.
+ HttpNetworkSession* http_network_session() const {
+ return http_network_session_.get();
+ }
+
private:
// We use a raw pointer to prevent reference cycles, since
// URLRequestContextStorage can often be contained within a URLRequestContext
@@ -90,6 +99,10 @@ class NET_EXPORT URLRequestContextStorage {
scoped_refptr<CookieStore> cookie_store_;
scoped_ptr<TransportSecurityState> transport_security_state_;
+ // Not actually pointed at by the URLRequestContext, but may be used (but not
+ // owned) by the HttpTransactionFactory.
+ scoped_ptr<HttpNetworkSession> http_network_session_;
+
scoped_ptr<HttpTransactionFactory> http_transaction_factory_;
scoped_ptr<URLRequestJobFactory> job_factory_;
scoped_ptr<URLRequestThrottlerManager> throttler_manager_;

Powered by Google App Engine
This is Rietveld 408576698