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

Unified Diff: net/url_request/url_fetcher_impl_unittest.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_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_impl_unittest.cc
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index d90d9f60753fcc81a48111d0904a094181a111eb..a415c0cb6566dede0e84ef74b7a54d6f07e293b4 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -127,7 +127,8 @@ class WaitingURLFetcherDelegate : public URLFetcherDelegate {
void OnURLFetchDownloadProgress(const URLFetcher* source,
int64_t current,
- int64_t total) override {
+ int64_t total,
+ int64_t current_network_bytes) override {
// Note that the current progress may be greater than the previous progress,
// in the case of retrying the request.
EXPECT_FALSE(did_complete_);
@@ -924,10 +925,11 @@ class CheckDownloadProgressDelegate : public WaitingURLFetcherDelegate {
void OnURLFetchDownloadProgress(const URLFetcher* source,
int64_t current,
- int64_t total) override {
+ int64_t total,
+ int64_t current_network_bytes) override {
// Run default checks.
- WaitingURLFetcherDelegate::OnURLFetchDownloadProgress(source, current,
- total);
+ WaitingURLFetcherDelegate::OnURLFetchDownloadProgress(
+ source, current, total, current_network_bytes);
EXPECT_LE(last_seen_progress_, current);
EXPECT_EQ(file_size_, total);
@@ -1011,7 +1013,8 @@ class CancelOnDownloadProgressDelegate : public WaitingURLFetcherDelegate {
void OnURLFetchDownloadProgress(const URLFetcher* source,
int64_t current,
- int64_t total) override {
+ int64_t total,
+ int64_t current_network_bytes) override {
CancelFetch();
}
« no previous file with comments | « net/url_request/url_fetcher_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698