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

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: Self review + added expectations 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
« Source/core/loader/LinkHeader.cpp ('K') | « Source/core/loader/LinkHeaderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
Mike West 2015/02/02 13:14:54 Hrm. this is somewhat strange. Why can't you fold
+{
+ 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/LinkHeader.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