Index: components/cronet/cert/cert_verifier_cache_persister.h |
diff --git a/components/cronet/cert/cert_verifier_cache_persister.h b/components/cronet/cert/cert_verifier_cache_persister.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e7b69e32d8d439c7873df0f46c9905ab51601299 |
--- /dev/null |
+++ b/components/cronet/cert/cert_verifier_cache_persister.h |
@@ -0,0 +1,31 @@ |
+// 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 COMPONENTS_CRONET_CERT_CERT_VERIFIER_CACHE_PERSISTER_H_ |
+#define COMPONENTS_CRONET_CERT_CERT_VERIFIER_CACHE_PERSISTER_H_ |
+ |
+#include "base/macros.h" |
Ryan Sleevi
2016/06/21 01:22:10
Unused?
ramant (doing other things)
2016/06/21 16:52:02
Done.
|
+#include "components/cronet/cert/proto/cert_verification.pb.h" |
Ryan Sleevi
2016/06/21 01:22:10
Forward declare, to avoid build system dependency
ramant (doing other things)
2016/06/21 16:52:02
Done.
|
+ |
+namespace net { |
+class CachingCertVerifier; |
+} // namespace net |
+ |
+namespace cronet { |
+ |
+// Iterates through |verifier|'s cache and returns serialized data. This can be |
+// used to populate a new net::CachingCertVerifier with |
+// |DeserializeCertVerifierCache()|. |
+cronet_pb::CertVerificationCache SerializeCertVerifierCache( |
+ const net::CachingCertVerifier& verifier); |
+ |
+// Populates |verifier|'s cache. Returns true if the |cert_cache| is |
+// deserialized correctly. |
+bool DeserializeCertVerifierCache( |
+ const cronet_pb::CertVerificationCache& cert_cache, |
+ net::CachingCertVerifier* verifier); |
+ |
+} // namespace cronet |
+ |
+#endif // COMPONENTS_CRONET_CERT_CERT_VERIFIER_CACHE_PERSISTER_H_ |