Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: net/proxy/in_process_mojo_proxy_resolver_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/proxy/in_process_mojo_proxy_resolver_factory.h ('k') | net/quic/crypto/common_cert_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h" 5 #include "net/proxy/in_process_mojo_proxy_resolver_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "net/proxy/mojo_proxy_resolver_factory_impl.h" 8 #include "net/proxy/mojo_proxy_resolver_factory_impl.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 // static 12 // static
13 InProcessMojoProxyResolverFactory* 13 InProcessMojoProxyResolverFactory*
14 InProcessMojoProxyResolverFactory::GetInstance() { 14 InProcessMojoProxyResolverFactory::GetInstance() {
15 return Singleton<InProcessMojoProxyResolverFactory>::get(); 15 return base::Singleton<InProcessMojoProxyResolverFactory>::get();
16 } 16 }
17 17
18 InProcessMojoProxyResolverFactory::InProcessMojoProxyResolverFactory() { 18 InProcessMojoProxyResolverFactory::InProcessMojoProxyResolverFactory() {
19 // Implementation lifetime is strongly bound to the life of the connection via 19 // Implementation lifetime is strongly bound to the life of the connection via
20 // |factory_|. When |factory_| is destroyed, the Mojo connection is terminated 20 // |factory_|. When |factory_| is destroyed, the Mojo connection is terminated
21 // which causes this object to be destroyed. 21 // which causes this object to be destroyed.
22 new MojoProxyResolverFactoryImpl(mojo::GetProxy(&factory_)); 22 new MojoProxyResolverFactoryImpl(mojo::GetProxy(&factory_));
23 } 23 }
24 24
25 InProcessMojoProxyResolverFactory::~InProcessMojoProxyResolverFactory() = 25 InProcessMojoProxyResolverFactory::~InProcessMojoProxyResolverFactory() =
26 default; 26 default;
27 27
28 scoped_ptr<base::ScopedClosureRunner> 28 scoped_ptr<base::ScopedClosureRunner>
29 InProcessMojoProxyResolverFactory::CreateResolver( 29 InProcessMojoProxyResolverFactory::CreateResolver(
30 const mojo::String& pac_script, 30 const mojo::String& pac_script,
31 mojo::InterfaceRequest<interfaces::ProxyResolver> req, 31 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
32 interfaces::ProxyResolverFactoryRequestClientPtr client) { 32 interfaces::ProxyResolverFactoryRequestClientPtr client) {
33 factory_->CreateResolver(pac_script, req.Pass(), client.Pass()); 33 factory_->CreateResolver(pac_script, req.Pass(), client.Pass());
34 return nullptr; 34 return nullptr;
35 } 35 }
36 36
37 } // namespace net 37 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/in_process_mojo_proxy_resolver_factory.h ('k') | net/quic/crypto/common_cert_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698