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

Unified Diff: net/http/http_stream_parser.cc

Issue 10834178: net: Return size of upload as well as position from HttpTransaction::GetUploadProgress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make UploadProgress a class instead of a struct Created 8 years, 4 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: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index cb5cb114381f7d3d3d7c05feb81a50a7eb8295d9..8d62d53b75b3ca0c305904f6abf3b6f1f3881de6 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -877,11 +877,11 @@ void HttpStreamParser::CalculateResponseBodySize() {
}
}
-uint64 HttpStreamParser::GetUploadProgress() const {
+UploadProgress HttpStreamParser::GetUploadProgress() const {
if (!request_body_.get())
- return 0;
+ return UploadProgress();
- return request_body_->position();
+ return UploadProgress(request_body_->position(), request_body_->size());
}
HttpResponseInfo* HttpStreamParser::GetResponseInfo() {

Powered by Google App Engine
This is Rietveld 408576698