Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // CertVerifierCachePersister provides API calls to serialize and deserialize | |
| 6 // CachingCertVerifier's cache. | |
| 7 // | |
| 8 // WARNING: This is experimental code, please don't use it. | |
| 9 | |
| 10 #ifndef NET_EXTRAS_CERT_CERT_VERIFIER_CACHE_PERSISTER_H_ | |
| 11 #define NET_EXTRAS_CERT_CERT_VERIFIER_CACHE_PERSISTER_H_ | |
| 12 | |
| 13 #include <string> | |
| 14 | |
| 15 #include "base/macros.h" | |
| 16 #include "net/base/net_export.h" | |
| 17 | |
| 18 namespace net { | |
| 19 | |
| 20 class CachingCertVerifier; | |
| 21 | |
| 22 class NET_EXPORT_PRIVATE CertVerifierCachePersister { | |
|
Ryan Sleevi
2016/06/08 21:38:10
This doesn't seem like it needs to be a class anym
ramant (doing other things)
2016/06/09 00:51:39
Done.
| |
| 23 public: | |
| 24 CertVerifierCachePersister(CachingCertVerifier* verifier); | |
|
Ryan Sleevi
2016/06/08 21:38:10
STYLE: Explicit
ramant (doing other things)
2016/06/09 00:51:39
Deleted the class.
| |
| 25 ~CertVerifierCachePersister(); | |
| 26 | |
| 27 // Recursively iterate over this |verifier_|'s |cache_| and all children and | |
| 28 // write the hierarchical structure into |data|. | |
|
Ryan Sleevi
2016/06/08 21:38:10
|cache_| is not a recursive structure.
Also, you'
ramant (doing other things)
2016/06/09 00:51:39
Done.
| |
| 29 void SerializeCache(std::string* data); | |
| 30 | |
| 31 // Populates CachingCertVerifier's |cache_|. Returns true if the |data| is | |
| 32 // deserialized correctly. | |
| 33 bool LoadCache(const std::string& data); | |
| 34 | |
| 35 private: | |
| 36 // |verifier_| whose |cache_| will be serialized/deserialized. | |
| 37 CachingCertVerifier* verifier_; // Owned by the caller. | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(CertVerifierCachePersister); | |
| 40 }; | |
| 41 | |
| 42 } // namespace net | |
| 43 | |
| 44 #endif // NET_EXTRAS_CERT_CERT_VERIFIER_CACHE_PERSISTER_H_ | |
| OLD | NEW |