Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: net/cert/internal/cert_issuer_source_aia.cc

Issue 2595723002: Allow CertNetFetcher to be shutdown from the network thread (Closed)
Patch Set: fix AIA tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "net/cert/internal/cert_issuer_source_aia.h" 5 #include "net/cert/internal/cert_issuer_source_aia.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "net/cert/cert_net_fetcher.h" 8 #include "net/cert/cert_net_fetcher.h"
9 #include "net/cert/internal/cert_errors.h" 9 #include "net/cert/internal/cert_errors.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 LOG(ERROR) << "Error parsing cert retrieved from AIA:\n" 86 LOG(ERROR) << "Error parsing cert retrieved from AIA:\n"
87 << errors.ToDebugString(); 87 << errors.ToDebugString();
88 return false; 88 return false;
89 } 89 }
90 90
91 return true; 91 return true;
92 } 92 }
93 93
94 } // namespace 94 } // namespace
95 95
96 CertIssuerSourceAia::CertIssuerSourceAia(CertNetFetcher* cert_fetcher) 96 CertIssuerSourceAia::CertIssuerSourceAia(
97 scoped_refptr<CertNetFetcher> cert_fetcher)
97 : cert_fetcher_(cert_fetcher) {} 98 : cert_fetcher_(cert_fetcher) {}
eroman 2017/01/11 01:56:59 std::move()
estark 2017/01/12 01:06:30 Done.
98 99
99 CertIssuerSourceAia::~CertIssuerSourceAia() = default; 100 CertIssuerSourceAia::~CertIssuerSourceAia() = default;
100 101
101 void CertIssuerSourceAia::SyncGetIssuersOf(const ParsedCertificate* cert, 102 void CertIssuerSourceAia::SyncGetIssuersOf(const ParsedCertificate* cert,
102 ParsedCertificateList* issuers) { 103 ParsedCertificateList* issuers) {
103 // CertIssuerSourceAia never returns synchronous results. 104 // CertIssuerSourceAia never returns synchronous results.
104 } 105 }
105 106
106 void CertIssuerSourceAia::AsyncGetIssuersOf(const ParsedCertificate* cert, 107 void CertIssuerSourceAia::AsyncGetIssuersOf(const ParsedCertificate* cert,
107 std::unique_ptr<Request>* out_req) { 108 std::unique_ptr<Request>* out_req) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // that this doesn't need to wait for async callback just to tell that an 145 // that this doesn't need to wait for async callback just to tell that an
145 // URL has an unsupported scheme? 146 // URL has an unsupported scheme?
146 aia_request->AddCertFetcherRequest(cert_fetcher_->FetchCaIssuers( 147 aia_request->AddCertFetcherRequest(cert_fetcher_->FetchCaIssuers(
147 url, kTimeoutMilliseconds, kMaxResponseBytes)); 148 url, kTimeoutMilliseconds, kMaxResponseBytes));
148 } 149 }
149 150
150 *out_req = std::move(aia_request); 151 *out_req = std::move(aia_request);
151 } 152 }
152 153
153 } // namespace net 154 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698