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

Side by Side Diff: extensions/browser/api/dns/host_resolver_wrapper.h

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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_API_DNS_HOST_RESOLVER_WRAPPER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_DNS_HOST_RESOLVER_WRAPPER_H_
6 #define EXTENSIONS_BROWSER_API_DNS_HOST_RESOLVER_WRAPPER_H_ 6 #define EXTENSIONS_BROWSER_API_DNS_HOST_RESOLVER_WRAPPER_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 22 matching lines...) Expand all
33 // Given a pointer to a ResourceContext, returns its HostResolver if 33 // Given a pointer to a ResourceContext, returns its HostResolver if
34 // SetHostResolverForTesting() hasn't been called, or else a 34 // SetHostResolverForTesting() hasn't been called, or else a
35 // a substitute MockHostResolver to use instead. 35 // a substitute MockHostResolver to use instead.
36 net::HostResolver* GetHostResolver(content::ResourceContext* context); 36 net::HostResolver* GetHostResolver(content::ResourceContext* context);
37 37
38 // Sets the MockHostResolver to return in GetHostResolver(). 38 // Sets the MockHostResolver to return in GetHostResolver().
39 void SetHostResolverForTesting(net::HostResolver* mock_resolver); 39 void SetHostResolverForTesting(net::HostResolver* mock_resolver);
40 40
41 private: 41 private:
42 HostResolverWrapper(); 42 HostResolverWrapper();
43 friend struct DefaultSingletonTraits<HostResolverWrapper>; 43 friend struct base::DefaultSingletonTraits<HostResolverWrapper>;
44 44
45 net::HostResolver* resolver_; 45 net::HostResolver* resolver_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(HostResolverWrapper); 47 DISALLOW_COPY_AND_ASSIGN(HostResolverWrapper);
48 }; 48 };
49 49
50 } // namespace extensions 50 } // namespace extensions
51 51
52 #endif // EXTENSIONS_BROWSER_API_DNS_HOST_RESOLVER_WRAPPER_H_ 52 #endif // EXTENSIONS_BROWSER_API_DNS_HOST_RESOLVER_WRAPPER_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/device_permissions_manager.cc ('k') | extensions/browser/api/dns/host_resolver_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698