Index: remoting/base/telemetry_log_writer.cc |
diff --git a/remoting/base/telemetry_log_writer.cc b/remoting/base/telemetry_log_writer.cc |
index 24360f0282cd346e9d5e30f06baa2af4dc0ab788..3ce8ab3151fcbc7e8814160c8b1499755572b3d1 100644 |
--- a/remoting/base/telemetry_log_writer.cc |
+++ b/remoting/base/telemetry_log_writer.cc |
@@ -9,6 +9,7 @@ |
#include "base/json/json_string_value_serializer.h" |
#include "base/logging.h" |
#include "net/http/http_status_code.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
namespace remoting { |
@@ -68,8 +69,27 @@ void TelemetryLogWriter::SendPendingEntries() { |
void TelemetryLogWriter::PostJsonToServer(const std::string& json) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
DCHECK(!request_); |
- request_ = request_factory_->CreateUrlRequest(UrlRequest::Type::POST, |
- telemetry_base_url_); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("CRD_telemetry_log", R"( |
+ semantics { |
+ sender: "Chrome Remote Desktop" |
+ description: "Telemetry logs for Chrome Remote Desktop." |
+ trigger: "Chrome Remote Desktop is being used." |
Ramin Halavati
2017/04/13 06:59:04
Is there any frequency to it, or e.g. when closing
Sergey Ulanov
2017/04/18 18:40:51
These requests sent periodically when a session is
Ramin Halavati
2017/04/19 05:45:15
Done.
|
+ data: "Anonymous usage statistics." |
+ destination: GOOGLE_OWNED_SERVICE |
+ } |
+ policy { |
+ cookies_allowed: false |
+ setting: |
+ "This feature cannot be disabled by settings. You can block Chrome " |
+ "Remote Desktop as specified here: " |
+ "https://support.google.com/chrome/?p=remote_desktop" |
+ policy_exception_justification: |
+ "The product is shipped separately from Chromium, except on Chrome " |
+ "OS." |
+ })"); |
+ request_ = request_factory_->CreateUrlRequest( |
+ UrlRequest::Type::POST, telemetry_base_url_, traffic_annotation); |
if (!auth_token_.empty()) { |
request_->AddHeader("Authorization:Bearer " + auth_token_); |
} |