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

Unified Diff: net/base/upload_data_stream.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/base/upload_data_stream.cc
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc
index bfcb44a0b7d068e2afc660b95b6131e0ba4bf10a..f36fd663b98cc6886d548eabcdb733ee1408498f 100644
--- a/net/base/upload_data_stream.cc
+++ b/net/base/upload_data_stream.cc
@@ -188,4 +188,13 @@ void UploadDataStream::OnReadCompleted(int result) {
base::ResetAndReturn(&callback_).Run(result);
}
+UploadProgress UploadDataStream::GetUploadProgress() const {
+ // While initialization / rewinding is in progress, return nothing.
+ if (!initialized_successfully_) {
+ return UploadProgress();
+ }
+
+ return UploadProgress(current_position_, total_size_);
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698