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

Unified Diff: chrome/browser/image_holder.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/image_holder.cc
diff --git a/chrome/browser/image_holder.cc b/chrome/browser/image_holder.cc
index 08d5bb2593118a13fca26e69a5f829eb6b766d1a..99e95c558c32ff0d0046dbf3c1b12db63c23c767 100644
--- a/chrome/browser/image_holder.cc
+++ b/chrome/browser/image_holder.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/profiles/profile.h"
#include "net/base/load_flags.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
namespace chrome {
@@ -59,7 +60,28 @@ void ImageHolder::CreateBitmapFetcher(const GURL& url) {
}
if (url.is_valid()) {
- fetchers_.push_back(new chrome::BitmapFetcher(url, this));
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("", R"(
+ semantics {
+ sender: ""
+ description: ""
+ trigger: ""
+ data: ""
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store_exceptions: ""
+ setting: ""
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ })");
+ fetchers_.push_back(
+ new chrome::BitmapFetcher(url, this, traffic_annotation));
DVLOG(2) << __func__ << "Pushing bitmap " << url;
}
}

Powered by Google App Engine
This is Rietveld 408576698