| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h" | |
| 6 | |
| 7 #include <utility> | |
| 8 | |
| 9 #include "base/memory/ptr_util.h" | |
| 10 #include "base/memory/singleton.h" | |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" | |
| 12 #include "net/proxy/mojo_proxy_resolver_factory_impl.h" | |
| 13 | |
| 14 namespace net { | |
| 15 | |
| 16 // static | |
| 17 InProcessMojoProxyResolverFactory* | |
| 18 InProcessMojoProxyResolverFactory::GetInstance() { | |
| 19 return base::Singleton<InProcessMojoProxyResolverFactory>::get(); | |
| 20 } | |
| 21 | |
| 22 InProcessMojoProxyResolverFactory::InProcessMojoProxyResolverFactory() { | |
| 23 mojo::MakeStrongBinding(base::MakeUnique<MojoProxyResolverFactoryImpl>(), | |
| 24 mojo::MakeRequest(&factory_)); | |
| 25 } | |
| 26 | |
| 27 InProcessMojoProxyResolverFactory::~InProcessMojoProxyResolverFactory() = | |
| 28 default; | |
| 29 | |
| 30 std::unique_ptr<base::ScopedClosureRunner> | |
| 31 InProcessMojoProxyResolverFactory::CreateResolver( | |
| 32 const std::string& pac_script, | |
| 33 mojo::InterfaceRequest<interfaces::ProxyResolver> req, | |
| 34 interfaces::ProxyResolverFactoryRequestClientPtr client) { | |
| 35 factory_->CreateResolver(pac_script, std::move(req), std::move(client)); | |
| 36 return nullptr; | |
| 37 } | |
| 38 | |
| 39 } // namespace net | |
| OLD | NEW |