Update V8 to version 4.7.42.
[chromium-blink-merge.git] / net / proxy / mojo_proxy_resolver_factory.h
blob2163cb0cad3ad6404c13e7fac7394ff3633cc1d1
1 // Copyright 2015 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_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
8 #include "base/callback_helpers.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "net/interfaces/host_resolver_service.mojom.h"
11 #include "net/interfaces/proxy_resolver_service.mojom.h"
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
14 namespace net {
16 // Factory for connecting to Mojo ProxyResolver services.
17 class MojoProxyResolverFactory {
18 public:
19 // Connect to a new ProxyResolver service using request |req|, using
20 // |host_resolver| as the DNS resolver. The return value should be released
21 // when the connection to |req| is no longer needed.
22 // Note: The connection request |req| may be resolved asynchronously.
23 virtual scoped_ptr<base::ScopedClosureRunner> CreateResolver(
24 const mojo::String& pac_script,
25 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
26 interfaces::ProxyResolverFactoryRequestClientPtr client) = 0;
28 protected:
29 virtual ~MojoProxyResolverFactory() = default;
32 } // namespace net
34 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_