| 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..0284aee9f250d2869c11ff9032366fd81f8dafa1 100644
|
| --- a/components/image_fetcher/core/image_fetcher.h
|
| +++ b/components/image_fetcher/core/image_fetcher.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/macros.h"
|
| +#include "base/optional.h"
|
| #include "components/data_use_measurement/core/data_use_user_data.h"
|
| #include "components/image_fetcher/core/image_fetcher_delegate.h"
|
| #include "url/gurl.h"
|
| @@ -44,6 +45,12 @@ 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(
|
| + base::Optional<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
|
|
|