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

Unified Diff: components/image_fetcher/core/image_data_fetcher.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_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..a58fc4ac5968a4df5d2454c2e968693ef3f0addd 100644
--- a/components/image_fetcher/core/image_data_fetcher.cc
+++ b/components/image_fetcher/core/image_data_fetcher.cc
@@ -60,19 +60,23 @@ void ImageDataFetcher::SetImageDownloadLimit(
void ImageDataFetcher::FetchImageData(
const GURL& image_url,
- const ImageDataFetcherCallback& callback) {
+ const ImageDataFetcherCallback& callback,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation) {
FetchImageData(
image_url, callback, /*referrer=*/std::string(),
- net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE);
+ net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
+ traffic_annotation);
}
void ImageDataFetcher::FetchImageData(
const GURL& image_url,
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);
+ net::URLRequest::ReferrerPolicy referrer_policy,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation) {
+ 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_);
« no previous file with comments | « components/image_fetcher/core/image_data_fetcher.h ('k') | components/image_fetcher/core/image_data_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698