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

Unified Diff: net/base/hash_value.h

Issue 1745283002: Pickle (serialize and deserialize) MultiThreadedCertVerifier's |cache_| (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/hash_value.cc » ('j') | net/cert/cert_verify_result.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/hash_value.h
diff --git a/net/base/hash_value.h b/net/base/hash_value.h
index a0e1d84d400f5df169ae210095ff4aedcf39b0b7..c6a10c66e5fcdf6af1fdd6330380b7d0949f6f50 100644
--- a/net/base/hash_value.h
+++ b/net/base/hash_value.h
@@ -12,6 +12,7 @@
#include <string>
#include <vector>
+#include "base/pickle.h"
#include "base/strings/string_piece.h"
#include "build/build_config.h"
#include "net/base/net_export.h"
@@ -21,6 +22,15 @@ namespace net {
struct NET_EXPORT SHA1HashValue {
bool Equals(const SHA1HashValue& other) const;
+ // Appends a representation of this object to the given pickle.
+ bool Persist(base::Pickle* pickle) const;
+
+ // Create an SHA1HashValue from the representation stored in the given pickle.
+ // The data for this object is found relative to the given pickle_iter, which
+ // should be passed to the pickle's various Read* methods.
+ // Returns false on failure.
+ static bool CreateFromPickle(base::PickleIterator* iter, SHA1HashValue* hash);
+
unsigned char data[20];
};
« no previous file with comments | « no previous file | net/base/hash_value.cc » ('j') | net/cert/cert_verify_result.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698