Chromium Code Reviews| 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..25d0d5e34d9db6880829337a8dc07add7ef041c5 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,38 @@ 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 a corp printer " |
|
Lei Zhang
2017/04/18 19:16:41
Drop the word corp? Lots of people use Cloud Print
Ramin Halavati
2017/04/19 05:59:07
Done.
|
| + "without needing to add the printer to their computer" |
| + trigger: |
| + "Printing and running background Cloud Print services." |
| + data: "..." |
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
| + } |
| + policy { |
| + cookies_allowed: true |
|
Vitaly Buka (NO REVIEWS)
2017/04/18 17:32:44
ths is incorrect
it sets net::LOAD_DO_NOT_SEND_COO
Ramin Halavati
2017/04/19 05:59:06
Done.
|
| + cookies_store: "user" |
| + 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 |
| + } |
| + } |
| + })"); |
| + 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()); |