Index: net/cert/internal/cert_issuer_source_collection.h |
diff --git a/net/cert/internal/cert_issuer_source_collection.h b/net/cert/internal/cert_issuer_source_collection.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..70c096152fd0cef2261d538f87fca1a35b45b77a |
--- /dev/null |
+++ b/net/cert/internal/cert_issuer_source_collection.h |
@@ -0,0 +1,38 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_COLLECTION_H_ |
+#define NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_COLLECTION_H_ |
+ |
+#include <vector> |
+ |
+#include "net/cert/internal/cert_issuer_source.h" |
+ |
+namespace net { |
+ |
+// Returns results from a collection of other CertIssuerSources. |
+class NET_EXPORT CertIssuerSourceCollection : public CertIssuerSource { |
+ public: |
+ CertIssuerSourceCollection(); |
+ ~CertIssuerSourceCollection() override; |
+ |
+ // Adds |source| to the list of CertIssuerSources that will provide issuers. |
+ void AddSource(CertIssuerSource* source); |
+ |
+ // CertIssuerSource implementation: |
+ void SyncGetIssuersOf(const ParsedCertificate* cert, |
+ ParsedCertificateList* issuers) override; |
+ void AsyncGetIssuersOf(scoped_refptr<ParsedCertificate> cert, |
+ const IssuerCallback& issuers_callback, |
+ std::unique_ptr<Request>* out_req) override; |
+ |
+ private: |
+ std::vector<CertIssuerSource*> sources_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CertIssuerSourceCollection); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_COLLECTION_H_ |