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

Unified Diff: components/image_fetcher/core/image_fetcher.h

Issue 2781473003: Add |SetImageDownloadLimit| to ImageFetcher to limit downloaded bytes (Closed)
Patch Set: Add |SetImageDownloadLimit| to ImageDataFetcher Created 3 years, 9 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: components/image_fetcher/core/image_fetcher.h
diff --git a/components/image_fetcher/core/image_fetcher.h b/components/image_fetcher/core/image_fetcher.h
index e1b121b3e338ca9045343a6e92103fe1c9db71e6..5bb4b091a5af2d3498454e347ef5395dd2dc4306 100644
--- a/components/image_fetcher/core/image_fetcher.h
+++ b/components/image_fetcher/core/image_fetcher.h
@@ -44,6 +44,11 @@ class ImageFetcher {
virtual void SetDataUseServiceName(
DataUseServiceName data_use_service_name) = 0;
+ // Sets an upper limit for image downloads that is by default disabled.
+ // Setting |max_download_bytes| to a negative value will disable the limit.
+ // Already running downloads are immediately affected.
+ virtual void SetImageDownloadLimit(int64_t max_download_bytes) = 0;
+
// Sets the desired size for images with multiple frames (like .ico files).
// By default, the image fetcher choses smaller images. Override to choose a
// frame with a size as close as possible to |size| (trying to take one in

Powered by Google App Engine
This is Rietveld 408576698