Index: net/url_request/url_fetcher_core.cc |
diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc |
index 98edef63c8e3a70b7e7d7ec32f894caf54be1bf7..76cbb57b7dd6a5e748c84db64fa63ff961a678f4 100644 |
--- a/net/url_request/url_fetcher_core.cc |
+++ b/net/url_request/url_fetcher_core.cc |
@@ -25,6 +25,7 @@ |
#include "net/base/upload_data_stream.h" |
#include "net/base/upload_file_element_reader.h" |
#include "net/http/http_response_headers.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/redirect_info.h" |
#include "net/url_request/url_fetcher_delegate.h" |
#include "net/url_request/url_fetcher_response_writer.h" |
@@ -551,8 +552,29 @@ void URLFetcherCore::StartURLRequest() { |
g_registry.Get().AddURLFetcherCore(this); |
current_response_bytes_ = 0; |
request_context_getter_->AddObserver(this); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("...", R"( |
+ semantics { |
+ sender: "..." |
+ description: "..." |
+ trigger: "..." |
+ data: "..." |
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL |
+ } |
+ policy { |
+ cookies_allowed: false/true |
+ cookies_store: "..." |
+ setting: "..." |
+ chrome_policy { |
+ [POLICY_NAME] { |
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
+ [POLICY_NAME]: ... //(value to disable it) |
+ } |
+ } |
+ policy_exception_justification: "..." |
+ })"); |
request_ = request_context_getter_->GetURLRequestContext()->CreateRequest( |
- original_url_, DEFAULT_PRIORITY, this); |
+ original_url_, DEFAULT_PRIORITY, this, traffic_annotation); |
asanka
2017/04/27 14:36:34
URLFetcherCore is just doing the work for URLFetch
|
int flags = request_->load_flags() | load_flags_; |
// TODO(mmenke): This should really be with the other code to set the upload |