| OLD | NEW |
| 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 #ifndef NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ | 5 #ifndef NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ |
| 6 #define NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ | 6 #define NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" |
| 10 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 11 | 12 |
| 12 namespace net { | 13 namespace net { |
| 13 | 14 |
| 14 class CertNetFetcher; | 15 class CertNetFetcher; |
| 15 class URLRequestContextGetter; | 16 class URLRequestContext; |
| 16 | 17 |
| 17 // Creates a CertNetFetcher that issues requests through the provided | 18 // Creates a CertNetFetcher that issues requests through the provided |
| 18 // URLRequestContext. | 19 // URLRequestContext. The URLRequestContext must stay valid until the returned |
| 19 // | 20 // CertNetFetcher's Shutdown method is called. The CertNetFetcher is to be |
| 20 // The returned CertNetFetcher is to be operated on a thread *other* than the | 21 // created and shutdown on the network thread. Its Fetch methods are to be used |
| 21 // thread used for the URLRequestContext (since it gives a blocking interface | 22 // on a *different* thread, since it gives a blocking interface to URL fetching. |
| 22 // to URL fetching). | 23 NET_EXPORT scoped_refptr<CertNetFetcher> CreateCertNetFetcher( |
| 23 NET_EXPORT std::unique_ptr<CertNetFetcher> CreateCertNetFetcher( | 24 URLRequestContext* context); |
| 24 URLRequestContextGetter* context_getter); | |
| 25 | 25 |
| 26 } // namespace net | 26 } // namespace net |
| 27 | 27 |
| 28 #endif // NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ | 28 #endif // NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ |
| OLD | NEW |