| 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 #ifndef NET_BASE_DEFAULT_TRUSTED_SPDY_PROXY_PROVIDER_H_ |
| 6 #define NET_BASE_DEFAULT_TRUSTED_SPDY_PROXY_PROVIDER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/threading/thread_checker.h" |
| 11 #include "net/base/net_export.h" |
| 12 #include "net/base/trusted_spdy_proxy_provider.h" |
| 13 #include "net/proxy/proxy_server.h" |
| 14 |
| 15 namespace net { |
| 16 |
| 17 // DefaultTrustedSpdyProxyProvider implements TrustedSpdyProxyProvider, and |
| 18 // returns the proxy that is set during the time of its construction. |
| 19 class NET_EXPORT_PRIVATE DefaultTrustedSpdyProxyProvider |
| 20 : public TrustedSpdyProxyProvider { |
| 21 public: |
| 22 explicit DefaultTrustedSpdyProxyProvider( |
| 23 const ProxyServer& trusted_spdy_proxy); |
| 24 ~DefaultTrustedSpdyProxyProvider() override; |
| 25 |
| 26 // TrustedSpdyProxyProvider implementation: |
| 27 void GetTrustedSpdyProxy(ProxyServer* trusted_spdy_proxy) const override; |
| 28 base::WeakPtr<TrustedSpdyProxyProvider> GetWeakPtr() override; |
| 29 |
| 30 private: |
| 31 const ProxyServer trusted_spdy_proxy_; |
| 32 |
| 33 base::ThreadChecker thread_checker_; |
| 34 |
| 35 base::WeakPtrFactory<TrustedSpdyProxyProvider> weak_factory_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(DefaultTrustedSpdyProxyProvider); |
| 38 }; |
| 39 |
| 40 } // namespace net |
| 41 |
| 42 #endif // NET_BASE_DEFAULT_TRUSTED_SPDY_PROXY_PROVIDER_H_ |
| OLD | NEW |