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

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: Rebased on master Created 3 years, 10 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 4eaf7f00a6cf11ccbd6d4e58db0e534a0e95193b..f6b2b5fd7c30773311618429cd73489ccf8e18c4 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.h
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.h
@@ -39,6 +39,7 @@
#include "wtf/Vector.h"
#include "wtf/text/StringHash.h"
+#include <stdint.h>
#include <memory>
namespace blink {
@@ -158,6 +159,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 all three
+// values are present and valid for a 206 response; otherwise returns false.
+// The following values will be outputted:
+// |*first_byte_position| = inclusive position of the first byte of the range
+// |*last_byte_position| = inclusive position of the last byte of the range
+// |*instance_length| = size in bytes of the object requested
+// If this method returns false, then all of the outputs will be -1.
+PLATFORM_EXPORT bool parseContentRangeHeaderFor206(const String& contentRange,
+ int64_t* firstBytePosition,
+ int64_t* lastBytePosition,
+ int64_t* instanceLength);
+
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698