| 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 #include "net/base/default_trusted_spdy_proxy_provider.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace net { |
| 10 |
| 11 DefaultTrustedSpdyProxyProvider::DefaultTrustedSpdyProxyProvider( |
| 12 const ProxyServer& trusted_spdy_proxy) |
| 13 : trusted_spdy_proxy_(trusted_spdy_proxy), weak_factory_(this) { |
| 14 DCHECK(thread_checker_.CalledOnValidThread()); |
| 15 } |
| 16 |
| 17 DefaultTrustedSpdyProxyProvider::~DefaultTrustedSpdyProxyProvider() { |
| 18 DCHECK(thread_checker_.CalledOnValidThread()); |
| 19 } |
| 20 |
| 21 void DefaultTrustedSpdyProxyProvider::GetTrustedSpdyProxy( |
| 22 ProxyServer* trusted_spdy_proxy) const { |
| 23 DCHECK(thread_checker_.CalledOnValidThread()); |
| 24 |
| 25 *trusted_spdy_proxy = trusted_spdy_proxy_; |
| 26 } |
| 27 |
| 28 base::WeakPtr<TrustedSpdyProxyProvider> |
| 29 DefaultTrustedSpdyProxyProvider::GetWeakPtr() { |
| 30 DCHECK(thread_checker_.CalledOnValidThread()); |
| 31 |
| 32 return weak_factory_.GetWeakPtr(); |
| 33 } |
| 34 |
| 35 } // namespace net |
| OLD | NEW |