QUIC - wait for disk cache to load server config if the server is among
[chromium-blink-merge.git] / net / proxy / mojo_proxy_resolver_impl.h
blob479fcfca2229d0d9bff78019c86a03319f95a960
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_IMPL_H_
6 #define NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_
8 #include <map>
9 #include <queue>
10 #include <set>
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "net/interfaces/proxy_resolver_service.mojom.h"
15 #include "net/proxy/proxy_resolver.h"
17 namespace net {
18 class ProxyResolverV8Tracing;
20 class MojoProxyResolverImpl : public interfaces::ProxyResolver {
21 public:
22 explicit MojoProxyResolverImpl(scoped_ptr<ProxyResolverV8Tracing> resolver);
24 ~MojoProxyResolverImpl() override;
26 private:
27 class Job;
29 // interfaces::ProxyResolver overrides.
30 void GetProxyForUrl(
31 const mojo::String& url,
32 interfaces::ProxyResolverRequestClientPtr client) override;
34 void DeleteJob(Job* job);
36 scoped_ptr<ProxyResolverV8Tracing> resolver_;
37 std::set<Job*> resolve_jobs_;
39 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverImpl);
42 } // namespace net
44 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_IMPL_H_