Index: chrome/service/cloud_print/cloud_print_url_fetcher.cc |
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher.cc b/chrome/service/cloud_print/cloud_print_url_fetcher.cc |
index eb05c6eb3524baf6ad66af36510ae8e60953080f..4cea475bd4f60abcb20b8eaf8fab9c23c57dc22c 100644 |
--- a/chrome/service/cloud_print/cloud_print_url_fetcher.cc |
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher.cc |
@@ -18,6 +18,7 @@ |
#include "components/data_use_measurement/core/data_use_user_data.h" |
#include "net/base/load_flags.h" |
#include "net/http/http_status_code.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_request_status.h" |
#include "url/gurl.h" |
@@ -259,7 +260,37 @@ void CloudPrintURLFetcher::StartRequestHelper( |
REQUEST_MAX); |
// Persist the additional headers in case we need to retry the request. |
additional_headers_ = additional_headers; |
- request_ = net::URLFetcher::Create(0, url, request_type, this); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("cloud_print_url_fetcher", R"( |
+ semantics { |
+ sender: "Cloud Print" |
+ description: |
+ "Google Cloud Print allows users to print to printers from Chrome " |
+ "and Android without needing to install print drivers." |
+ trigger: |
+ "Printing and running background Cloud Print services." |
Ramin Halavati
2017/04/19 05:59:07
Can "background" be elaborated?
Lei Zhang
2017/04/19 19:27:25
This is part of the Cloud Print Connector that can
|
+ data: "..." |
Ramin Halavati
2017/04/19 05:59:07
What is sent?
Lei Zhang
2017/04/19 19:27:26
StartPostRequest() and StartGetRequest() both use
|
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL |
Ramin Halavati
2017/04/19 05:59:07
I assume it should be OTHER?
Lei Zhang
2017/04/19 19:27:25
That would be consistent with "cloud_print_privet_
|
+ } |
+ policy { |
+ cookies_allowed: false |
+ setting: |
+ "This feature cannot be disabled by settings." |
+ chrome_policy { |
+ CloudPrintProxyEnabled { |
+ policy_options {mode: MANDATORY} |
+ CloudPrintProxyEnabled: false |
+ } |
+ } |
+ chrome_policy { |
+ CloudPrintSubmitEnabled { |
+ policy_options {mode: MANDATORY} |
+ CloudPrintSubmitEnabled: false |
+ } |
+ } |
+ })"); |
Ramin Halavati
2017/04/19 05:59:07
Are both policies required to disable this request
Lei Zhang
2017/04/19 19:27:25
CloudPrintSubmitEnabled doesn't belong here. It's
|
+ request_ = |
+ net::URLFetcher::Create(0, url, request_type, this, traffic_annotation); |
data_use_measurement::DataUseUserData::AttachToFetcher( |
request_.get(), data_use_measurement::DataUseUserData::CLOUD_PRINT); |
request_->SetRequestContext(GetRequestContextGetter()); |