summaryrefslogtreecommitdiffstats
path: root/net/proxy/sync_host_resolver.h
blob: 153dfad2a8c510b8a4a19da4fb254ff537d405cc (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
// Copyright (c) 2012 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_SYNC_HOST_RESOLVER_H_
#define NET_PROXY_SYNC_HOST_RESOLVER_H_

#include "net/base/host_resolver.h"
#include "net/base/net_export.h"

namespace net {

class BoundNetLog;

// Interface used by ProxyResolverJSBindings to abstract a synchronous host
// resolver module (which includes a Shutdown method).
class NET_EXPORT_PRIVATE SyncHostResolver {
 public:
  virtual ~SyncHostResolver() {}

  virtual int Resolve(const HostResolver::RequestInfo& info,
                      AddressList* addresses,
                      const BoundNetLog& net_log) = 0;

  // Optionally aborts any blocking resolves that are in progress.
  virtual void Shutdown() = 0;
};

}  // namespace net

#endif  // NET_PROXY_SYNC_HOST_RESOLVER_H_