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

Unified Diff: Source/platform/ParsingUtilities.h

Issue 889883002: Add a parser for Link headers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Handle null headers Created 5 years, 11 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: Source/platform/ParsingUtilities.h
diff --git a/Source/platform/ParsingUtilities.h b/Source/platform/ParsingUtilities.h
index 3ba75629a2d4d8437f62e4649c7c8d975117eeea..3ea8df0e3e05e3978073746374730cb7fefef6e1 100644
--- a/Source/platform/ParsingUtilities.h
+++ b/Source/platform/ParsingUtilities.h
@@ -76,6 +76,13 @@ void skipUntil(const CharType*& position, const CharType* end, CharType delimite
}
template<typename CharType, bool characterPredicate(CharType)>
+void skipUntil(const CharType*& position, const CharType* end, CharType delimiter)
+{
+ while (position < end && !characterPredicate(*position) && *position != delimiter)
+ ++position;
+}
+
+template<typename CharType, bool characterPredicate(CharType)>
void skipUntil(const CharType*& position, const CharType* end)
{
while (position < end && !characterPredicate(*position))
« Source/core/loader/LinkHeaderTest.cpp ('K') | « Source/core/loader/LinkHeaderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698