summaryrefslogtreecommitdiffstats
path: root/headless/public/network.h
blob: efede2becf0e9802163f440c32d3511ac978741c (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 2015 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 HEADLESS_PUBLIC_NETWORK_H_
#define HEADLESS_PUBLIC_NETWORK_H_

#include <base/macros.h>
#include <base/memory/ref_counted.h>
#include <base/memory/scoped_ptr.h>

namespace net {
class URLRequestContextGetter;
class ClientSocketFactory;
class HttpTransactionFactory;
}

namespace headless {

class Network {
 public:
  static scoped_refptr<net::URLRequestContextGetter>
  CreateURLRequestContextGetterUsingSocketFactory(
      scoped_ptr<net::ClientSocketFactory> socket_factory);

  static scoped_refptr<net::URLRequestContextGetter>
  CreateURLRequestContextGetterUsingHttpTransactionFactory(
      scoped_ptr<net::HttpTransactionFactory> http_transaction_factory);

 private:
  Network() = delete;
};

}  // namespace headless

#endif  // HEADLESS_PUBLIC_NETWORK_H_