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

Unified Diff: net/http/http_util.h

Issue 78343004: Net: Standardize HttpByteRange printing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « net/http/http_byte_range_unittest.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.h
diff --git a/net/http/http_util.h b/net/http/http_util.h
index ae65146e6e4a42a21f673787d037f06330c9eb0b..b5b833f30bc43c61780cc8c9c698d04090bbc930 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -66,6 +66,13 @@ class NET_EXPORT HttpUtil {
static bool ParseRangeHeader(const std::string& range_specifier,
std::vector<HttpByteRange>* ranges);
+ // Prints the ranges in the standard HTTP form, e.g. "bytes=0-10,300-400,-40".
+ // |ranges| must contain one or more elements. All elements must be valid.
+ static std::string PrintRanges(const std::vector<HttpByteRange>& ranges);
+
+ // Prints the range header a single range. Assumes a valid |range|.
+ static std::string PrintRange(const HttpByteRange& range);
cbentzel 2013/11/22 16:24:35 Remove PrintRanges and place it in the only test f
+
// Scans the '\r\n'-delimited headers for the given header name. Returns
// true if a match is found. Input is assumed to be well-formed.
// TODO(darin): kill this
« no previous file with comments | « net/http/http_byte_range_unittest.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698