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..80283b7f99114365848f8fe0c900171e1e424f18 |
--- /dev/null |
+++ b/components/cronet/cert/cert_verifier_cache_persister.h |
@@ -0,0 +1,32 @@ |
+// 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_ |
Ryan Sleevi
2016/06/21 20:31:02
s/Persister/Serializer/, to reflect your naming of
ramant (doing other things)
2016/06/22 03:51:36
Done.
|
+ |
+namespace cronet_pb { |
+class CertVerificationCache; |
+} // namespace cronet_pb |
+ |
+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_ |