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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.h

Issue 2889033002: Better header value parsing for Server-Timing. (Closed)
Patch Set: add TODOs for skipping all whitespace Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // |*instance_length| = size in bytes of the object requested 170 // |*instance_length| = size in bytes of the object requested
171 // If this method returns false, then all of the outputs will be -1. 171 // If this method returns false, then all of the outputs will be -1.
172 PLATFORM_EXPORT bool ParseContentRangeHeaderFor206(const String& content_range, 172 PLATFORM_EXPORT bool ParseContentRangeHeaderFor206(const String& content_range,
173 int64_t* first_byte_position, 173 int64_t* first_byte_position,
174 int64_t* last_byte_position, 174 int64_t* last_byte_position,
175 int64_t* instance_length); 175 int64_t* instance_length);
176 176
177 PLATFORM_EXPORT std::unique_ptr<ServerTimingHeaderVector> 177 PLATFORM_EXPORT std::unique_ptr<ServerTimingHeaderVector>
178 ParseServerTimingHeader(const String&); 178 ParseServerTimingHeader(const String&);
179 179
180 PLATFORM_EXPORT String CheckDoubleQuotedString(const String&);
181
182 using Mode = blink::ParsedContentType::Mode; 180 using Mode = blink::ParsedContentType::Mode;
183 PLATFORM_EXPORT bool Consume(char, const String&, unsigned&); 181 PLATFORM_EXPORT bool Consume(char, const String&, unsigned&);
184 PLATFORM_EXPORT bool ConsumeToken(Mode, const String&, unsigned&, StringView&); 182 PLATFORM_EXPORT bool ConsumeToken(Mode, const String&, unsigned&, StringView&);
185 PLATFORM_EXPORT bool ConsumeQuotedString(const String&, unsigned&, String&); 183 PLATFORM_EXPORT bool ConsumeQuotedString(const String&, unsigned&, String&);
186 PLATFORM_EXPORT bool ConsumeTokenOrQuotedString(Mode, 184 PLATFORM_EXPORT bool ConsumeTokenOrQuotedString(Mode,
187 const String&, 185 const String&,
188 unsigned&, 186 unsigned&,
189 String&); 187 String&);
190 PLATFORM_EXPORT bool IsEnd(const String&, unsigned); 188 PLATFORM_EXPORT bool IsEnd(const String&, unsigned);
191 189
192 } // namespace blink 190 } // namespace blink
193 191
194 #endif 192 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698