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