| Index: remoting/host/gcd_rest_client.cc
|
| diff --git a/remoting/host/gcd_rest_client.cc b/remoting/host/gcd_rest_client.cc
|
| index b58b7ffdbcb992d00c647398e541dca8272d7c79..314665d2bc7b43bf6645bfe091f2ba4d7d9dedb4 100644
|
| --- a/remoting/host/gcd_rest_client.cc
|
| +++ b/remoting/host/gcd_rest_client.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "base/time/default_clock.h"
|
| #include "base/values.h"
|
| +#include "net/traffic_annotation/network_traffic_annotation.h"
|
| #include "net/url_request/url_fetcher.h"
|
| #include "remoting/base/logging.h"
|
|
|
| @@ -77,8 +78,29 @@ void GcdRestClient::PatchState(
|
|
|
| // Prepare an HTTP request to issue once an auth token is available.
|
| callback_ = callback;
|
| - url_fetcher_ =
|
| - net::URLFetcher::Create(GURL(url), net::URLFetcher::POST, this);
|
| + net::NetworkTrafficAnnotationTag traffic_annotation =
|
| + net::DefineNetworkTrafficAnnotation("...", R"(
|
| + semantics {
|
| + sender: "..."
|
| + description: "..."
|
| + trigger: "..."
|
| + data: "..."
|
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
|
| + }
|
| + policy {
|
| + cookies_allowed: false/true
|
| + cookies_store: "..."
|
| + setting: "..."
|
| + policy {
|
| + [POLICY_NAME] {
|
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
|
| + [POLICY_NAME]: ... //(value to disable it)
|
| + }
|
| + }
|
| + policy_exception_justification: "..."
|
| + })");
|
| + url_fetcher_ = net::URLFetcher::Create(GURL(url), net::URLFetcher::POST, this,
|
| + traffic_annotation);
|
| url_fetcher_->SetUploadData("application/json", patch_string);
|
| if (url_request_context_getter_) {
|
| url_fetcher_->SetRequestContext(url_request_context_getter_.get());
|
|
|