Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / net / http / http_transaction_factory.h
blob673a6f921e3e27335f24ecbaa5ed27fede28fef6
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_HTTP_HTTP_TRANSACTION_FACTORY_H_
6 #define NET_HTTP_HTTP_TRANSACTION_FACTORY_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "net/base/net_export.h"
10 #include "net/base/request_priority.h"
12 namespace net {
14 class HttpCache;
15 class HttpNetworkSession;
16 class HttpTransaction;
18 // An interface to a class that can create HttpTransaction objects.
19 class NET_EXPORT HttpTransactionFactory {
20 public:
21 virtual ~HttpTransactionFactory() {}
23 // Creates a HttpTransaction object. On success, saves the new
24 // transaction to |*trans| and returns OK.
25 virtual int CreateTransaction(RequestPriority priority,
26 scoped_ptr<HttpTransaction>* trans) = 0;
28 // Returns the associated cache if any (may be NULL).
29 virtual HttpCache* GetCache() = 0;
31 // Returns the associated HttpNetworkSession used by new transactions.
32 virtual HttpNetworkSession* GetSession() = 0;
35 } // namespace net
37 #endif // NET_HTTP_HTTP_TRANSACTION_FACTORY_H_