Index: components/reporting/core/browser/reporting_util.cc |
diff --git a/components/reporting/core/browser/reporting_util.cc b/components/reporting/core/browser/reporting_util.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d2bd8751bdf9f0c52602ee044aa9f5607b7f772c |
--- /dev/null |
+++ b/components/reporting/core/browser/reporting_util.cc |
@@ -0,0 +1,20 @@ |
+// 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. |
+ |
+#include "components/reporting/core/browser/reporting_util.h" |
+ |
+#include "base/json/json_reader.h" |
+ |
+namespace reporting { |
+ |
+// Per |
+// https://greenbytes.de/tech/webdav/draft-reschke-http-jfv-02.html#rfc.section.4 |
+// assuming |normalized_header| is the result of completing step 1. |
+std::unique_ptr<base::Value> ParseJFV( |
+ const std::string& normalized_header_value) { |
+ std::string value = "[" + normalized_header_value + "]"; |
+ return base::JSONReader::Read(value); |
+} |
+ |
+} // namespace reporting |