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

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

Issue 2254533002: [FeaturePolicy] Initial implementation of Feature Policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fp-flag
Patch Set: Addressing comments from PS#16 Created 4 years, 2 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
Index: third_party/WebKit/Source/platform/network/HTTPParsers.h
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.h b/third_party/WebKit/Source/platform/network/HTTPParsers.h
index 6c84e4aca6979e1e91c5efe5c087231321c9afa9..6a622cd8ba9446fee841abd673a1896ca5089c15 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.h
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.h
@@ -32,12 +32,15 @@
#define HTTPParsers_h
#include "platform/PlatformExport.h"
+#include "platform/json/JSONValues.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
#include "wtf/HashSet.h"
#include "wtf/Vector.h"
#include "wtf/text/StringHash.h"
+#include <memory>
+
namespace blink {
class Suborigin;
@@ -157,6 +160,11 @@ PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes,
ResourceResponse*,
size_t* end);
+// Parses a header value containing JSON data, according to
+// https://tools.ietf.org/html/draft-ietf-httpbis-jfv-01
+// Returns an empty unique_ptr if the header cannot be parsed as JSON.
+PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader(
+ const String& header);
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698