OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |