Chromium Code Reviews| 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..5b0548da3e47ca3b64c73d1239b4fb1f3dae55a2 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,38 @@ void ThreatDetailsCacheCollector::OpenEntry() { |
| return; |
| } |
| - current_fetch_ = net::URLFetcher::Create(GURL(resources_it_->first), |
| - net::URLFetcher::GET, this); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("safe_browsing_cache_collector", R"( |
| + semantics { |
| + sender: "Threat Details Cache Collector" |
| + description: |
| + "This request fetches differnt items from safe browsing cache " |
| + "and DOES NOT make an actual network request." |
| + trigger: |
| + "When safe browsing extended report is collecting data." |
| + data: |
| + "None" |
| + destination: OTHER |
| + } |
| + policy { |
| + cookies_allowed: false |
| + setting: |
| + "Users can enable or disable this feature by stopping sending " |
| + "security incident reports to Google via disabling 'Automatically " |
| + "report details of possible security incdients to Google.' in " |
| + "Chrome's settings under Advanced Settings, Privacy. The feature " |
| + "is enabled by default." |
|
Nathan Parker
2017/03/06 17:48:54
is disabled by default
Ramin Halavati
2017/03/07 08:24:47
Done.
|
| + policy { |
| + SafeBrowsingExtendedReportingOptInAllowed { |
| + policy_options {mode: MANDATORY} |
| + value: false |
|
Nathan Parker
2017/03/06 17:48:54
I'm not sure what "false" means in this context.
Ramin Halavati
2017/03/07 08:24:47
Here we need the value that disables the feature,
|
| + } |
| + } |
| + })"); |
| + |
| + 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); |