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

Unified Diff: net/url_request/url_request_job.h

Issue 1362793003: Notify NetworkDelegate when bytes have been sent over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 5 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
« no previous file with comments | « net/url_request/url_request_http_job_unittest.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.h
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 8524bf02f4951be69ef2f209b8678c1993ed8fb1..0b96bfca1c24e1afb2e7bcd4d5f488a0dfedd810 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -402,10 +402,9 @@ class NET_EXPORT URLRequestJob
// |location| and |http_status_code|.
RedirectInfo ComputeRedirectInfo(const GURL& location, int http_status_code);
- // Notify the network delegate that more bytes have been received over the
- // network, if bytes have been received since the previous notification.
- // TODO(sclittle): Have this method also notify about sent bytes once
- // URLRequestJob::GetTotalSentBytes has been implemented (crbug.com/518897).
+ // Notify the network delegate that more bytes have been received or sent over
+ // the network, if bytes have been received or sent since the previous
+ // notification.
void MaybeNotifyNetworkBytes();
// Indicates that the job is done producing data, either it has completed
@@ -452,6 +451,11 @@ class NET_EXPORT URLRequestJob
// newly received since the last notification.
int64_t last_notified_total_received_bytes_;
+ // The value from GetTotalSentBytes() the last time MaybeNotifyNetworkBytes()
+ // was called. Used to calculate how bytes have been newly sent since the last
+ // notification.
+ int64_t last_notified_total_sent_bytes_;
+
base::WeakPtrFactory<URLRequestJob> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
« no previous file with comments | « net/url_request/url_request_http_job_unittest.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698