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

Unified Diff: net/http/http_network_layer.h

Issue 19747: URLRequestContext and disk cache for media files (Closed)
Patch Set: signed and unsigned... Created 11 years, 10 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_cache_unittest.cc ('k') | net/http/http_network_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_layer.h
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h
index 8424b2f1da32e8df1643c17242b83702dbe43892..a2bb491248db9729989ba2e8a861dd305f6ceb8b 100644
--- a/net/http/http_network_layer.h
+++ b/net/http/http_network_layer.h
@@ -19,17 +19,29 @@ class HttpNetworkLayer : public HttpTransactionFactory {
public:
// |proxy_service| must remain valid for the lifetime of HttpNetworkLayer.
explicit HttpNetworkLayer(ProxyService* proxy_service);
+ // Construct a HttpNetworkLayer with an existing HttpNetworkSession which
+ // contains a valid ProxyService.
+ explicit HttpNetworkLayer(HttpNetworkSession* session);
~HttpNetworkLayer();
// This function hides the details of how a network layer gets instantiated
// and allows other implementations to be substituted.
static HttpTransactionFactory* CreateFactory(ProxyService* proxy_service);
+ // Create a transaction factory that instantiate a network layer over an
+ // existing network session. Network session contains some valuable
+ // information (e.g. authentication data) that we want to share across
+ // multiple network layers. This method exposes the implementation details
+ // of a network layer, use this method with an existing network layer only
+ // when network session is shared.
+ static HttpTransactionFactory* CreateFactory(HttpNetworkSession* session);
// HttpTransactionFactory methods:
virtual HttpTransaction* CreateTransaction();
virtual HttpCache* GetCache();
virtual void Suspend(bool suspend);
+ HttpNetworkSession* GetSession();
+
private:
// The proxy service being used for the session.
ProxyService* proxy_service_;
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_network_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698