Chromium Code Reviews| 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 |
| 13 namespace base { | |
| 14 class SingleThreadTaskRunner; | |
| 15 } // namespace base | |
| 16 | |
| 12 namespace net { | 17 namespace net { |
| 13 | 18 |
| 14 class CertNetFetcher; | 19 class CertNetFetcher; |
| 20 class URLRequestContext; | |
| 15 class URLRequestContextGetter; | 21 class URLRequestContextGetter; |
| 16 | 22 |
| 17 // Creates a CertNetFetcher that issues requests through the provided | 23 // Creates a CertNetFetcher that issues requests through the provided |
| 18 // URLRequestContext. | 24 // URLRequestContext (which must outlived the CertNetFetcher) on the |
|
eroman
2017/01/03 20:42:37
typo outlived.
Also as far as word-smithing, it n
estark
2017/01/05 19:08:40
Done.
| |
| 19 // | 25 // given TaskRunner. The CertNetFetcher is to be created and shutdown on |
| 20 // The returned CertNetFetcher is to be operated on a thread *other* than the | 26 // the network thread corresponding to |task_runner| and |context|. Its |
| 21 // thread used for the URLRequestContext (since it gives a blocking interface | 27 // Fetch methods are to be used on a *different* thread, since it gives |
| 22 // to URL fetching). | 28 // a blocking interface to URL fetching. |
| 23 NET_EXPORT std::unique_ptr<CertNetFetcher> CreateCertNetFetcher( | 29 NET_EXPORT scoped_refptr<CertNetFetcher> CreateCertNetFetcher( |
| 30 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | |
|
eroman
2017/01/03 20:42:38
I don't think we should have this variant (that ta
estark
2017/01/05 19:08:40
Done.
| |
| 31 URLRequestContext* context); | |
| 32 | |
| 33 // Creates a CertNetFetcher that issues requests through the provider | |
| 34 // |context_getter|'s URLRequestContext. This function is to be called | |
| 35 // on a thread *other* than the thread used for the URLRequestContext | |
| 36 // (since it gives a blocking interface to URL fetching). | |
| 37 NET_EXPORT scoped_refptr<CertNetFetcher> CreateCertNetFetcherOnCallerThread( | |
|
eroman
2017/01/03 20:42:37
I don't think we want to expose this function.
Th
estark
2017/01/05 19:08:40
Done; however, I'm not sure if I did this properly
| |
| 24 URLRequestContextGetter* context_getter); | 38 URLRequestContextGetter* context_getter); |
| 25 | 39 |
| 26 } // namespace net | 40 } // namespace net |
| 27 | 41 |
| 28 #endif // NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ | 42 #endif // NET_CERT_NET_CERT_NET_FETCHER_IMPL_H_ |
| OLD | NEW |