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

Unified Diff: remoting/base/telemetry_log_writer.cc

Issue 2729423003: Network traffic annotation added to chromium_url_request. (Closed)
Patch Set: Annotations updated. 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/base/chromium_url_request.cc ('k') | remoting/base/telemetry_log_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6a6bbec167992cd6855158d65f2a8269585a0340 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,29 @@ 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."
+ data: "Anonymous usage statistics."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: "..."
+ setting:
+ "This feature cannot be disabled by settings. You can block Chrome "
+ "Remote Desktop as specified here: "
+ "https://support.google.com/chrome/a/answer/2799701?hl=en"
+ policy_exception_justification:
+ "The product is shipped separately from Chromium, except on Chrome "
+ "OS. In future the same code will be used for the host and we "
+ "could potentially add one."
Sergey Ulanov 2017/04/04 00:16:48 Not sure the second sentence is necessary. If you
Ramin Halavati 2017/04/04 07:37:18 Done.
+ })");
+ request_ = request_factory_->CreateUrlRequest(
+ UrlRequest::Type::POST, telemetry_base_url_, traffic_annotation);
if (!auth_token_.empty()) {
request_->AddHeader("Authorization:Bearer " + auth_token_);
}
« no previous file with comments | « remoting/base/chromium_url_request.cc ('k') | remoting/base/telemetry_log_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698