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

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: test Created 5 years, 2 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/url_request/url_request_context_builder.cc ('k') | net/url_request/url_request_context_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8e2bf0eab3d8e885fe897376bdd0a497e1652025..77c2807a56c73403f1cedc2b15b89d412b54f498 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(
scoped_ptr<TransportSecurityState> transport_security_state);
+ void set_http_network_session(
+ scoped_ptr<HttpNetworkSession> http_network_session);
void set_http_transaction_factory(
scoped_ptr<HttpTransactionFactory> http_transaction_factory);
void set_job_factory(scoped_ptr<URLRequestJobFactory> job_factory);
@@ -70,6 +73,12 @@ class NET_EXPORT URLRequestContextStorage {
scoped_ptr<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
@@ -92,6 +101,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_;
« no previous file with comments | « net/url_request/url_request_context_builder.cc ('k') | net/url_request/url_request_context_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698