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

Unified Diff: net/url_request/url_request.cc

Issue 2330983002: Removes get upload progress plumbing. URLRequest queries the UploadDataStream directly. (Closed)
Patch Set: Rebased till refs/heads/master@{#417939} Created 4 years, 3 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/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 593ee18a382dc3974b9d9a3fd4d10e7837a94ea2..37d8139795c4d7dfd408e70a320d64148b0270ad 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -362,7 +362,10 @@ UploadProgress URLRequest::GetUploadProgress() const {
// cached results from the initial job, the POST.
return final_upload_progress_;
}
- return job_->GetUploadProgress();
+ if (upload_data_stream_) {
+ return upload_data_stream_->GetUploadProgress();
+ }
mmenke 2016/09/12 19:35:31 nit: Don't use braces on single-line if.
shivanisha 2016/09/14 20:40:25 done.
+ return UploadProgress();
}
void URLRequest::GetResponseHeaderByName(const string& name,
@@ -961,8 +964,8 @@ int URLRequest::Redirect(const RedirectInfo& redirect_info) {
return ERR_UNSAFE_REDIRECT;
}
- if (!final_upload_progress_.position())
- final_upload_progress_ = job_->GetUploadProgress();
+ if (!final_upload_progress_.position() && upload_data_stream_)
+ final_upload_progress_ = upload_data_stream_->GetUploadProgress();
PrepareToRestart();
if (redirect_info.new_method != method_) {

Powered by Google App Engine
This is Rietveld 408576698