Index: content/browser/download/download_request_core.cc |
diff --git a/content/browser/download/download_request_core.cc b/content/browser/download/download_request_core.cc |
index e5c28d806acd21ae93e7cde58106fa8f6537d7cb..b16e605adc82e87e98b0c5b6b746ac3cbb11bb63 100644 |
--- a/content/browser/download/download_request_core.cc |
+++ b/content/browser/download/download_request_core.cc |
@@ -40,6 +40,7 @@ |
#include "net/http/http_request_headers.h" |
#include "net/http/http_response_headers.h" |
#include "net/http/http_status_code.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/url_request_context.h" |
namespace content { |
@@ -116,13 +117,35 @@ std::unique_ptr<net::URLRequest> DownloadRequestCore::CreateRequestOnIOThread( |
<< "Content initiated downloads shouldn't specify a download ID"; |
DCHECK(params->offset() >= 0); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("...", R"( |
David Trainor- moved to gerrit
2017/05/23 01:07:40
download_manager_url_request
|
+ semantics { |
+ sender: "..." |
David Trainor- moved to gerrit
2017/05/23 01:07:40
download_manager
|
+ description: "..." |
David Trainor- moved to gerrit
2017/05/23 01:07:40
A download request that can come from a variety of
|
+ trigger: "..." |
David Trainor- moved to gerrit
2017/05/23 01:07:40
This needs to be filled in based on who is buildin
|
+ data: "..." |
David Trainor- moved to gerrit
2017/05/23 01:07:40
Could you clarify, do we want to describe the data
|
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL |
David Trainor- moved to gerrit
2017/05/23 01:07:40
WEBSITE. Although in the future we'll need GOOGLE
|
+ } |
+ policy { |
+ cookies_allowed: false/true |
David Trainor- moved to gerrit
2017/05/23 01:07:40
true. It depends on the caller and which UrlReque
|
+ cookies_store: "..." |
David Trainor- moved to gerrit
2017/05/23 01:07:40
Same as above. Probably depends on the call site.
|
+ setting: "..." |
David Trainor- moved to gerrit
2017/05/23 01:07:40
Also depends on the call site. Sadly it looks lik
|
+ chrome_policy { |
+ [POLICY_NAME] { |
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
+ [POLICY_NAME]: ... //(value to disable it) |
+ } |
+ } |
+ policy_exception_justification: "..." |
+ })"); |
// ResourceDispatcherHost{Base} is-not-a URLRequest::Delegate, and |
// DownloadUrlParameters can-not include resource_dispatcher_host_impl.h, so |
// we must down cast. RDHI is the only subclass of RDH as of 2012 May 4. |
std::unique_ptr<net::URLRequest> request( |
params->url_request_context_getter() |
->GetURLRequestContext() |
- ->CreateRequest(params->url(), net::DEFAULT_PRIORITY, nullptr)); |
+ ->CreateRequest(params->url(), net::DEFAULT_PRIORITY, nullptr, |
+ traffic_annotation)); |
request->set_method(params->method()); |
if (!params->post_body().empty()) { |