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

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 2254533002: [FeaturePolicy] Initial implementation of Feature Policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fp-flag
Patch Set: Addressing nits Created 4 years, 1 month 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 | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/network/HTTPParsers.cpp
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index 1394de50114c89898aa7cb4130cb2babd9af521c..1ff1cc6e568ecac757a5550d969709f10073f6e7 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -34,6 +34,7 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
+#include "platform/json/JSONParser.h"
#include "platform/network/ResourceResponse.h"
#include "platform/weborigin/Suborigin.h"
#include "public/platform/WebString.h"
@@ -896,4 +897,14 @@ bool parseMultipartHeadersFromBody(const char* bytes,
return true;
}
+// See https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01, Section 4.
+std::unique_ptr<JSONArray> parseJSONHeader(const String& header) {
+ StringBuilder sb;
+ sb.append("[");
+ sb.append(header);
+ sb.append("]");
+ std::unique_ptr<JSONValue> headerValue = parseJSON(sb.toString());
+ return JSONArray::cast(std::move(headerValue));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698