Index: net/http/http_network_layer.h |
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h |
index fc94d0a7234b5f07a8e026a098414a5df77e82be..a3bbf0d6454b337f51169f71972af2f1f7c0d6fe 100644 |
--- a/net/http/http_network_layer.h |
+++ b/net/http/http_network_layer.h |
@@ -52,6 +52,21 @@ class NET_EXPORT HttpNetworkLayer |
virtual void OnSuspend() OVERRIDE; |
virtual void OnResume() OVERRIDE; |
+ class TransactionFactory { |
szym
2014/02/27 16:12:37
This is confusing. HttpNetworkLayer is a HttpTrans
|
+ public: |
+ virtual ~TransactionFactory() {} |
+ |
+ // Creates a HttpTransaction object. On success, saves the new |
+ // transaction to |*trans| and returns OK. |
+ virtual int CreateTransaction(RequestPriority priority, |
+ HttpNetworkSession* session, |
+ scoped_ptr<HttpTransaction>* trans) = 0; |
+ }; |
+ |
+ // Set a global transaction factory. Factory will be used to construct |
+ // transactions instead of HttpNetworkTransaction. |
+ static void SetTransactionFactory(TransactionFactory*); |
+ |
private: |
const scoped_refptr<HttpNetworkSession> session_; |
bool suspended_; |