Index: chrome/browser/safe_browsing/threat_details_cache.cc |
diff --git a/chrome/browser/safe_browsing/threat_details_cache.cc b/chrome/browser/safe_browsing/threat_details_cache.cc |
index 066e06a332099be0f351cb17e7899ad338e2fbee..baf76f1d04bcaa161693288a9c3adf4421db4280 100644 |
--- a/chrome/browser/safe_browsing/threat_details_cache.cc |
+++ b/chrome/browser/safe_browsing/threat_details_cache.cc |
@@ -21,6 +21,7 @@ |
#include "net/base/load_flags.h" |
#include "net/base/net_errors.h" |
#include "net/http/http_response_headers.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_request_context_getter.h" |
#include "net/url_request/url_request_status.h" |
@@ -81,8 +82,31 @@ void ThreatDetailsCacheCollector::OpenEntry() { |
return; |
} |
- current_fetch_ = net::URLFetcher::Create(GURL(resources_it_->first), |
- net::URLFetcher::GET, this); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("...", R"( |
+ semantics { |
+ sender: "..." |
Nathan Parker
2017/02/23 01:16:53
This really isn't a network request, so I'm not su
Ramin Halavati
2017/02/23 08:18:24
I think we can add an annotation specifying this.
|
+ description: "..." |
+ trigger: "..." |
+ data: "..." |
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
+ } |
+ policy { |
+ cookies_allowed: false/true |
+ cookies_store: "..." |
+ setting: "..." |
+ policy { |
+ [POLICY_NAME] { |
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
+ value: ... |
+ } |
+ } |
+ policy_exception_justification: "..." |
+ })"); |
+ |
+ current_fetch_ = |
+ net::URLFetcher::Create(GURL(resources_it_->first), net::URLFetcher::GET, |
+ this, traffic_annotation); |
data_use_measurement::DataUseUserData::AttachToFetcher( |
current_fetch_.get(), |
data_use_measurement::DataUseUserData::SAFE_BROWSING); |