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

Unified Diff: net/url_request/url_fetcher_core.cc

Issue 2378173002: Precache per-resource cap should be applied on network bytes used (Closed)
Patch Set: 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
« no previous file with comments | « net/url_request/url_fetcher_core.h ('k') | net/url_request/url_fetcher_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_core.cc
diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc
index 3d49ad233d242badf58232f4f1897b3740ef2330..20c7c7900b0dd5dccb2260d80679cd231d606556 100644
--- a/net/url_request/url_fetcher_core.cc
+++ b/net/url_request/url_fetcher_core.cc
@@ -936,16 +936,19 @@ void URLFetcherCore::InformDelegateDownloadProgress() {
delegate_task_runner_->PostTask(
FROM_HERE,
base::Bind(
- &URLFetcherCore::InformDelegateDownloadProgressInDelegateThread,
- this, current_response_bytes_, total_response_bytes_));
+ &URLFetcherCore::InformDelegateDownloadProgressInDelegateThread, this,
+ current_response_bytes_, total_response_bytes_,
+ request_->GetTotalReceivedBytes()));
}
void URLFetcherCore::InformDelegateDownloadProgressInDelegateThread(
int64_t current,
- int64_t total) {
+ int64_t total,
+ int64_t current_network_bytes) {
DCHECK(delegate_task_runner_->BelongsToCurrentThread());
if (delegate_)
- delegate_->OnURLFetchDownloadProgress(fetcher_, current, total);
+ delegate_->OnURLFetchDownloadProgress(fetcher_, current, total,
+ current_network_bytes);
}
void URLFetcherCore::AssertHasNoUploadData() const {
« no previous file with comments | « net/url_request/url_fetcher_core.h ('k') | net/url_request/url_fetcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698