summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_resolver_factory.h
blob: 17b3f9ba5474900992e0b0060f94618c08b99e21 (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
37
38
// 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 NET_PROXY_PROXY_RESOLVER_FACTORY_H_
#define NET_PROXY_PROXY_RESOLVER_FACTORY_H_

#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"

namespace net {

class ProxyResolver;

// ProxyResolverFactory is an interface for creating ProxyResolver instances.
class NET_EXPORT ProxyResolverFactory {
 public:
  explicit ProxyResolverFactory(bool resolvers_expect_pac_bytes);

  virtual ~ProxyResolverFactory();

  // Creates a new ProxyResolver. The caller is responsible for freeing this
  // object.
  virtual scoped_ptr<ProxyResolver> CreateProxyResolver() = 0;

  bool resolvers_expect_pac_bytes() const {
    return resolvers_expect_pac_bytes_;
  }

 private:
  bool resolvers_expect_pac_bytes_;

  DISALLOW_COPY_AND_ASSIGN(ProxyResolverFactory);
};

}  // namespace net

#endif  // NET_PROXY_PROXY_RESOLVER_FACTORY_H_