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

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

Issue 2543073002: Don't show a placeholder if the response contains the full image. (Closed)
Patch Set: Initial patchset Created 4 years 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 a4941d8d1d6010c285d6f726ebd0e097680f2583..29790949335a5562132c9e4c2f009c4ea7aac5f0 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.h
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.h
@@ -40,6 +40,7 @@
#include "wtf/text/StringHash.h"
#include <memory>
+#include <stdint.h>
namespace blink {
@@ -168,6 +169,18 @@ PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes,
PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader(const String& header,
int maxParseDepth);
+// Extracts the values in a Content-Range header and returns true if they are
+// valid for a 206 response; otherwise returns false.
+// The following values will be outputted:
+// |*firstBytePosition| = inclusive position of the first byte of the range
+// |*lastBytePosition| = inclusive position of the last byte of the range
+// |*instanceLength| = size in bytes of the object requested
+// If any of the above values is unknown, its value will be -1.
+PLATFORM_EXPORT bool parseContentRangeHeader(const String& contentRange,
+ int64_t* firstBytePosition,
+ int64_t* lastBytePosition,
+ int64_t* instanceLength);
+
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698