| 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_;
|
|
|