| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_HTTP_TRANSACTION_FACTORY_H__ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_FACTORY_H__ |
| 6 #define NET_HTTP_HTTP_TRANSACTION_FACTORY_H__ | 6 #define NET_HTTP_HTTP_TRANSACTION_FACTORY_H__ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 class HttpCache; | 13 class HttpCache; |
| 14 class HttpNetworkSession; | 14 class HttpNetworkSession; |
| 15 class HttpTransaction; | 15 class HttpTransaction; |
| 16 | 16 class HttpTransactionDelegate; |
| 17 | 17 |
| 18 // An interface to a class that can create HttpTransaction objects. | 18 // An interface to a class that can create HttpTransaction objects. |
| 19 class NET_EXPORT HttpTransactionFactory { | 19 class NET_EXPORT HttpTransactionFactory { |
| 20 public: | 20 public: |
| 21 virtual ~HttpTransactionFactory() {} | 21 virtual ~HttpTransactionFactory() {} |
| 22 | 22 |
| 23 // Creates a HttpTransaction object. On success, saves the new | 23 // Creates a HttpTransaction object. On success, saves the new |
| 24 // transaction to |*trans| and returns OK. | 24 // transaction to |*trans| and returns OK. |
| 25 virtual int CreateTransaction(scoped_ptr<HttpTransaction>* trans) = 0; | 25 virtual int CreateTransaction(scoped_ptr<HttpTransaction>* trans, |
| 26 HttpTransactionDelegate* delegate) = 0; |
| 26 | 27 |
| 27 // Returns the associated cache if any (may be NULL). | 28 // Returns the associated cache if any (may be NULL). |
| 28 virtual HttpCache* GetCache() = 0; | 29 virtual HttpCache* GetCache() = 0; |
| 29 | 30 |
| 30 // Returns the associated HttpNetworkSession used by new transactions. | 31 // Returns the associated HttpNetworkSession used by new transactions. |
| 31 virtual HttpNetworkSession* GetSession() = 0; | 32 virtual HttpNetworkSession* GetSession() = 0; |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 } // namespace net | 35 } // namespace net |
| 35 | 36 |
| 36 #endif // NET_HTTP_HTTP_TRANSACTION_FACTORY_H__ | 37 #endif // NET_HTTP_HTTP_TRANSACTION_FACTORY_H__ |
| OLD | NEW |