Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / net / proxy / in_process_mojo_proxy_resolver_factory.h
blobc6ee223ca65789138f0b2d9f589e922ca4cedff8
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 namespace base {
12 template <typename T>
13 struct DefaultSingletonTraits;
16 namespace net {
18 // Factory to connect to an in-process Mojo proxy resolver service.
19 // NOTE: This is intended to be temporary for debugging purposes and will be
20 // removed when we're confident with the out-of-process implementation.
21 class InProcessMojoProxyResolverFactory : public MojoProxyResolverFactory {
22 public:
23 static InProcessMojoProxyResolverFactory* GetInstance();
25 // Overridden from MojoProxyResolverFactory:
26 scoped_ptr<base::ScopedClosureRunner> CreateResolver(
27 const mojo::String& pac_script,
28 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
29 interfaces::ProxyResolverFactoryRequestClientPtr client) override;
31 private:
32 InProcessMojoProxyResolverFactory();
33 ~InProcessMojoProxyResolverFactory() override;
34 friend struct base::DefaultSingletonTraits<InProcessMojoProxyResolverFactory>;
36 interfaces::ProxyResolverFactoryPtr factory_;
38 DISALLOW_COPY_AND_ASSIGN(InProcessMojoProxyResolverFactory);
41 } // namespace net
43 #endif // NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_