Index: net/cert/ct_log_response_parser.h |
diff --git a/net/cert/ct_log_response_parser.h b/net/cert/ct_log_response_parser.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..068d7801957b686096b2689d2d039ebdd736c43c |
--- /dev/null |
+++ b/net/cert/ct_log_response_parser.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2014 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_CT_LOG_RESPONSE_PARSER_H_ |
+#define NET_CERT_CT_LOG_RESPONSE_PARSER_H_ |
+ |
+#include "base/strings/string_piece.h" |
+#include "net/base/net_export.h" |
+ |
+namespace net { |
+ |
+namespace ct { |
+struct SignedTreeHead; |
+ |
+// A class for decoding Certificate Transparency logs' JSON replies. |
+class NET_EXPORT CTLogResponseParser { |
+ public: |
+ // Fills in |sth| from its JSON representation in |json_sth|. |
+ // Returns true and fills in |sth| if all fields are present and valid. |
+ // Otherwise, returns false and does not modify |sth|. |
+ static bool FillSignedTreeHead(const base::StringPiece& json_sth, |
Ryan Sleevi
2014/04/09 18:23:11
Style: Classes with just a static method are gener
Eran Messeri
2014/04/10 21:08:29
Done and done.
|
+ SignedTreeHead* sth); |
+}; |
+ |
+} // namespace ct |
+ |
+} // namespace net |
+#endif // NET_CERT_CT_LOG_RESPONSE_PARSER_H_ |