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

Unified Diff: net/http/http_response_headers.cc

Issue 2549143003: Cleaned up the API of HttpUtil::ParseContentRangeHeader(). (Closed)
Patch Set: Fixed unittest 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
« no previous file with comments | « net/http/http_response_headers.h ('k') | net/http/http_response_headers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 6aa795118dc8983df6cbf7d8e5e051878e0e8532..b849d7848558ad8968d5599c58af1d8777a22732 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1303,9 +1303,10 @@ int64_t HttpResponseHeaders::GetInt64HeaderValue(
return result;
}
-bool HttpResponseHeaders::GetContentRange(int64_t* first_byte_position,
- int64_t* last_byte_position,
- int64_t* instance_length) const {
+bool HttpResponseHeaders::GetContentRangeFor206(
+ int64_t* first_byte_position,
+ int64_t* last_byte_position,
+ int64_t* instance_length) const {
size_t iter = 0;
std::string content_range_spec;
if (!EnumerateHeader(&iter, kContentRange, &content_range_spec)) {
@@ -1313,9 +1314,9 @@ bool HttpResponseHeaders::GetContentRange(int64_t* first_byte_position,
return false;
}
- return HttpUtil::ParseContentRangeHeader(content_range_spec,
- first_byte_position,
- last_byte_position, instance_length);
+ return HttpUtil::ParseContentRangeHeaderFor206(
+ content_range_spec, first_byte_position, last_byte_position,
+ instance_length);
}
std::unique_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
« no previous file with comments | « net/http/http_response_headers.h ('k') | net/http/http_response_headers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698