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

Unified Diff: chrome/browser/bitmap_fetcher/bitmap_fetcher.cc

Issue 2682263002: Network traffic annotation added to chrome::BitmapFetcher. (Closed)
Patch Set: Unittests added. Created 3 years, 10 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: chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
index 35c5ab92b9f358ce463868ecef383b72b7931408..dc663d74cc309deb5d657601da603c60733b042b 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher.cc
@@ -11,9 +11,12 @@
namespace chrome {
-BitmapFetcher::BitmapFetcher(const GURL& url, BitmapFetcherDelegate* delegate)
+BitmapFetcher::BitmapFetcher(
+ const GURL& url, BitmapFetcherDelegate* delegate,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation)
: url_(url),
- delegate_(delegate) {
+ delegate_(delegate),
+ traffic_annotation_(traffic_annotation) {
}
BitmapFetcher::~BitmapFetcher() {
@@ -26,7 +29,8 @@ void BitmapFetcher::Init(net::URLRequestContextGetter* request_context,
if (url_fetcher_ != NULL)
return;
- url_fetcher_ = net::URLFetcher::Create(url_, net::URLFetcher::GET, this);
+ url_fetcher_ = net::URLFetcher::Create(
+ url_, net::URLFetcher::GET, this, traffic_annotation_);
url_fetcher_->SetRequestContext(request_context);
url_fetcher_->SetReferrer(referrer);
url_fetcher_->SetReferrerPolicy(referrer_policy);

Powered by Google App Engine
This is Rietveld 408576698