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

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

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: 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 1cb6d2628854b6cde54417edc8a6fe57d941a935..ccbc25cf8d7525d8fa45a1e2c91f98f59a0f8c30 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.
// TODO(treib,markusheintz): We're not guaranteed that the ID also matches.
« no previous file with comments | « components/image_fetcher/core/image_fetcher_impl.h ('k') | components/image_fetcher/ios/ios_image_data_fetcher_wrapper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698