Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: remoting/host/gcd_rest_client.cc

Issue 2737463002: Network traffic annotation added to remoting/host. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/dns_blackhole_checker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « remoting/host/dns_blackhole_checker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698