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

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

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: Annotation moved to callers. 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_data_fetcher.cc
diff --git a/components/image_fetcher/core/image_data_fetcher.cc b/components/image_fetcher/core/image_data_fetcher.cc
index 3eac4508d217ea70e3c40c11f5add05b16514b17..72de8620188d4f7bf8bf7325a2c321b2bfccf128 100644
--- a/components/image_fetcher/core/image_data_fetcher.cc
+++ b/components/image_fetcher/core/image_data_fetcher.cc
@@ -41,10 +41,12 @@ struct ImageDataFetcher::ImageDataFetcherRequest {
};
ImageDataFetcher::ImageDataFetcher(
- net::URLRequestContextGetter* url_request_context_getter)
+ net::URLRequestContextGetter* url_request_context_getter,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation)
: url_request_context_getter_(url_request_context_getter),
data_use_service_name_(DataUseUserData::IMAGE_FETCHER_UNTAGGED),
- next_url_fetcher_id_(0) {}
+ next_url_fetcher_id_(0),
+ traffic_annotation_(traffic_annotation) {}
ImageDataFetcher::~ImageDataFetcher() {}
@@ -71,8 +73,9 @@ void ImageDataFetcher::FetchImageData(
const ImageDataFetcherCallback& callback,
const std::string& referrer,
net::URLRequest::ReferrerPolicy referrer_policy) {
- std::unique_ptr<net::URLFetcher> url_fetcher = net::URLFetcher::Create(
- next_url_fetcher_id_++, image_url, net::URLFetcher::GET, this);
+ std::unique_ptr<net::URLFetcher> url_fetcher =
+ net::URLFetcher::Create(next_url_fetcher_id_++, image_url,
+ net::URLFetcher::GET, this, traffic_annotation_);
DataUseUserData::AttachToFetcher(url_fetcher.get(), data_use_service_name_);

Powered by Google App Engine
This is Rietveld 408576698