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

Unified Diff: remoting/host/dns_blackhole_checker.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 | « no previous file | remoting/host/gcd_rest_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/dns_blackhole_checker.cc
diff --git a/remoting/host/dns_blackhole_checker.cc b/remoting/host/dns_blackhole_checker.cc
index 1f71ad5200b1265440409b7cb427f6faa543821b..d01558c3df56282237035ed23efa876b2a425dcd 100644
--- a/remoting/host/dns_blackhole_checker.cc
+++ b/remoting/host/dns_blackhole_checker.cc
@@ -5,6 +5,7 @@
#include "remoting/host/dns_blackhole_checker.h"
#include "base/callback_helpers.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/logging.h"
@@ -58,8 +59,29 @@ void DnsBlackholeChecker::CheckForDnsBlackhole(
}
talkgadget_url += kTalkGadgetUrl;
HOST_LOG << "Verifying connection to " << talkgadget_url;
- url_fetcher_ = net::URLFetcher::Create(GURL(talkgadget_url),
- net::URLFetcher::GET, 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(talkgadget_url), net::URLFetcher::GET, this, traffic_annotation);
url_fetcher_->SetRequestContext(url_request_context_getter_.get());
url_fetcher_->Start();
} else {
« no previous file with comments | « no previous file | remoting/host/gcd_rest_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698