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

Unified Diff: net/url_request/url_request.cc

Issue 2298823002: Resetting the HttpRequestInfo pointers in HttpNetworkTransaction and streams (Closed)
Patch Set: Rebased, removed upload progress plumbing, feedback. (Rebased till refs/heads/master@{#417381}) 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 dcbaf36a6a5e93bc7ddd60b76944f4c20267364f..51fb74b6506c051088573be874acd58249317e37 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();
+ }
+ 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