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

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

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: All comments addressed. Created 3 years, 7 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 567928c9a6df05e2daadc47bbb5870fc235aa8f4..9b2ff006b9961bd241caa64de2d434db517cd9f5 100644
--- a/components/image_fetcher/core/image_fetcher_impl.cc
+++ b/components/image_fetcher/core/image_fetcher_impl.cc
@@ -51,7 +51,8 @@ void ImageFetcherImpl::SetImageDownloadLimit(
void ImageFetcherImpl::StartOrQueueNetworkRequest(
const std::string& id,
const GURL& image_url,
- const ImageFetcherCallback& callback) {
+ const ImageFetcherCallback& callback,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation) {
// Before starting to fetch the image. Look for a request in progress for
// |image_url|, and queue if appropriate.
ImageRequestMap::iterator it = pending_net_requests_.find(image_url);
@@ -62,8 +63,10 @@ void ImageFetcherImpl::StartOrQueueNetworkRequest(
pending_net_requests_[image_url].swap(&request);
image_data_fetcher_->FetchImageData(
- image_url, base::Bind(&ImageFetcherImpl::OnImageURLFetched,
- base::Unretained(this), image_url));
+ image_url,
+ base::Bind(&ImageFetcherImpl::OnImageURLFetched, base::Unretained(this),
+ image_url),
+ traffic_annotation);
} else {
// Request in progress. Register as an interested callback.
it->second.callbacks.push_back(callback);

Powered by Google App Engine
This is Rietveld 408576698