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

Side by Side Diff: net/cert/internal/cert_issuer_source_static.h

Issue 2453093004: Remove dependence on a message loop for net::PathBuilder. (Closed)
Patch Set: remove unnecessary forward decl Created 4 years 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 #ifndef NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_STATIC_H_ 5 #ifndef NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_STATIC_H_
6 #define NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_STATIC_H_ 6 #define NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_STATIC_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/cert/internal/cert_issuer_source.h" 12 #include "net/cert/internal/cert_issuer_source.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 // Synchronously returns issuers from a pre-supplied set. 16 // Synchronously returns issuers from a pre-supplied set.
17 class NET_EXPORT CertIssuerSourceStatic : public CertIssuerSource { 17 class NET_EXPORT CertIssuerSourceStatic : public CertIssuerSource {
18 public: 18 public:
19 CertIssuerSourceStatic(); 19 CertIssuerSourceStatic();
20 ~CertIssuerSourceStatic() override; 20 ~CertIssuerSourceStatic() override;
21 21
22 // Adds |cert| to the set of certificates that this CertIssuerSource will 22 // Adds |cert| to the set of certificates that this CertIssuerSource will
23 // provide. 23 // provide.
24 void AddCert(scoped_refptr<ParsedCertificate> cert); 24 void AddCert(scoped_refptr<ParsedCertificate> cert);
25 25
26 // CertIssuerSource implementation: 26 // CertIssuerSource implementation:
27 void SyncGetIssuersOf(const ParsedCertificate* cert, 27 void SyncGetIssuersOf(const ParsedCertificate* cert,
28 ParsedCertificateList* issuers) override; 28 ParsedCertificateList* issuers) override;
29 void AsyncGetIssuersOf(const ParsedCertificate* cert, 29 void AsyncGetIssuersOf(const ParsedCertificate* cert,
30 const IssuerCallback& issuers_callback,
31 std::unique_ptr<Request>* out_req) override; 30 std::unique_ptr<Request>* out_req) override;
32 31
33 private: 32 private:
34 // The certificates that the CertIssuerSourceStatic can return, keyed on the 33 // The certificates that the CertIssuerSourceStatic can return, keyed on the
35 // normalized subject value. 34 // normalized subject value.
36 std::unordered_multimap<base::StringPiece, 35 std::unordered_multimap<base::StringPiece,
37 scoped_refptr<ParsedCertificate>, 36 scoped_refptr<ParsedCertificate>,
38 base::StringPieceHash> 37 base::StringPieceHash>
39 intermediates_; 38 intermediates_;
40 39
41 DISALLOW_COPY_AND_ASSIGN(CertIssuerSourceStatic); 40 DISALLOW_COPY_AND_ASSIGN(CertIssuerSourceStatic);
42 }; 41 };
43 42
44 } // namespace net 43 } // namespace net
45 44
46 #endif // NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_STATIC_H_ 45 #endif // NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_STATIC_H_
OLDNEW
« no previous file with comments | « net/cert/internal/cert_issuer_source_aia_unittest.cc ('k') | net/cert/internal/cert_issuer_source_static.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698