summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_transaction_factory.h
blob: bb626f9d2015a8bf4bdb0b027338111b1d584b6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_SPDY_SPDY_TRANSACTION_FACTORY_H__
#define NET_SPDY_SPDY_TRANSACTION_FACTORY_H__

#include "net/http/http_transaction_factory.h"
#include "net/spdy/spdy_network_transaction.h"

namespace net {

class SpdyTransactionFactory : public HttpTransactionFactory {
 public:
  explicit SpdyTransactionFactory(HttpNetworkSession* session)
     : session_(session) {
  }
  virtual ~SpdyTransactionFactory() {}

  // HttpTransactionFactory Interface.
  virtual HttpTransaction* CreateTransaction() {
    return new SpdyNetworkTransaction(session_);
  }
  virtual HttpCache* GetCache() {
    return NULL;
  }
  virtual void Suspend(bool suspend) {
  }

 private:
  scoped_refptr<HttpNetworkSession> session_;
};

}  // namespace net

#endif  // NET_SPDY_SPDY_TRANSACTION_FACTORY_H__