Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / net / proxy / in_process_mojo_proxy_resolver_factory.h
blobf130dca0fb94a33bf6afbd21767852e8f6cbb1bd
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_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_
6 #define NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_
8 #include "base/macros.h"
9 #include "net/proxy/mojo_proxy_resolver_factory.h"
11 template <typename T>
12 struct DefaultSingletonTraits;
14 namespace net {
16 // Factory to connect to an in-process Mojo proxy resolver service.
17 // NOTE: This is intended to be temporary for debugging purposes and will be
18 // removed when we're confident with the out-of-process implementation.
19 class InProcessMojoProxyResolverFactory : public MojoProxyResolverFactory {
20 public:
21 static InProcessMojoProxyResolverFactory* GetInstance();
23 // Overridden from MojoProxyResolverFactory:
24 scoped_ptr<base::ScopedClosureRunner> CreateResolver(
25 const mojo::String& pac_script,
26 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
27 interfaces::ProxyResolverFactoryRequestClientPtr client) override;
29 private:
30 InProcessMojoProxyResolverFactory();
31 ~InProcessMojoProxyResolverFactory() override;
32 friend struct DefaultSingletonTraits<InProcessMojoProxyResolverFactory>;
34 interfaces::ProxyResolverFactoryPtr factory_;
36 DISALLOW_COPY_AND_ASSIGN(InProcessMojoProxyResolverFactory);
39 } // namespace net
41 #endif // NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_