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

Unified Diff: components/image_fetcher/core/image_fetcher_impl.cc

Issue 2781473003: Add |SetImageDownloadLimit| to ImageFetcher to limit downloaded bytes (Closed)
Patch Set: Test fix: Mock pure virtual Setter in CrOS notification test 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_impl.cc
diff --git a/components/image_fetcher/core/image_fetcher_impl.cc b/components/image_fetcher/core/image_fetcher_impl.cc
index 82310ecc0bce646b231a0f6abe54d3203c102ec1..567928c9a6df05e2daadc47bbb5870fc235aa8f4 100644
--- a/components/image_fetcher/core/image_fetcher_impl.cc
+++ b/components/image_fetcher/core/image_fetcher_impl.cc
@@ -43,6 +43,11 @@ void ImageFetcherImpl::SetDesiredImageFrameSize(const gfx::Size& size) {
desired_image_frame_size_ = size;
}
+void ImageFetcherImpl::SetImageDownloadLimit(
+ base::Optional<int64_t> max_download_bytes) {
+ image_data_fetcher_->SetImageDownloadLimit(max_download_bytes);
+}
+
void ImageFetcherImpl::StartOrQueueNetworkRequest(
const std::string& id,
const GURL& image_url,

Powered by Google App Engine
This is Rietveld 408576698