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

Unified Diff: remoting/protocol/port_allocator.cc

Issue 2729423003: Network traffic annotation added to chromium_url_request. (Closed)
Patch Set: Annotation templates added. 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
Index: remoting/protocol/port_allocator.cc
diff --git a/remoting/protocol/port_allocator.cc b/remoting/protocol/port_allocator.cc
index 5a0666886139190a2129a153ae684b6e5f530792..4460ea7e4fdb516fe42779a268a585393a919a19 100644
--- a/remoting/protocol/port_allocator.cc
+++ b/remoting/protocol/port_allocator.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_split.h"
#include "net/base/escape.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "remoting/protocol/network_settings.h"
#include "remoting/protocol/transport_context.h"
@@ -150,9 +151,30 @@ void PortAllocatorSession::TryCreateRelaySession() {
net::EscapeUrlEncodedData(username(), false) +
"&password=" +
net::EscapeUrlEncodedData(password(), false) + "&sn=1";
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
Sergey Ulanov 2017/03/17 18:59:33 "CRD Relay Session Request"
Ramin Halavati 2017/04/03 10:01:25 Done.
+ semantics {
+ sender: "..."
Sergey Ulanov 2017/03/17 18:59:33 Chrome Remote Desktop
Ramin Halavati 2017/04/03 10:01:26 Done.
+ description: "..."
Sergey Ulanov 2017/03/17 18:59:33 "Request used by Chrome Remote Desktop to allocate
Ramin Halavati 2017/04/03 10:01:26 Done.
+ trigger: "..."
Sergey Ulanov 2017/03/17 18:59:33 Chrome Remote Desktop usage.
Ramin Halavati 2017/04/03 10:01:25 Again, please elaborate if possible.
+ data: "..."
Sergey Ulanov 2017/03/17 18:59:33 Relay token (received over XMPP)
Ramin Halavati 2017/04/03 10:01:25 Please either elaborate here or in description. Th
Sergey Ulanov 2017/04/04 00:16:48 Maybe "A temporary authentication token issues by
Ramin Halavati 2017/04/04 07:37:18 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
Sergey Ulanov 2017/03/17 18:59:33 GOOGLE_OWNED_SERVICE
Ramin Halavati 2017/04/03 10:01:25 Done.
+ }
+ policy {
+ cookies_allowed: false/true
Sergey Ulanov 2017/03/17 18:59:33 false
Ramin Halavati 2017/04/03 10:01:25 Again, cookies are not specifically disabled. Can
Sergey Ulanov 2017/04/04 00:16:47 Yes, please
Ramin Halavati 2017/04/04 07:37:18 Done, in https://codereview.chromium.org/279228300
+ cookies_store: "..."
Sergey Ulanov 2017/03/17 18:59:33 N/A
Ramin Halavati 2017/04/03 10:01:25 Acknowledged.
+ setting: "..."
Sergey Ulanov 2017/03/17 18:59:33 Block Chrome Remote Desktop (see https://support.g
Ramin Halavati 2017/04/03 10:01:25 Done.
+ chrome_policy {
+ [POLICY_NAME] {
Sergey Ulanov 2017/03/17 18:59:33 RemoteAccessHostFirewallTraversal (only applicable
Ramin Halavati 2017/04/03 10:01:26 Done.
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
Sergey Ulanov 2017/03/17 18:59:33 0, false
Ramin Halavati 2017/04/03 10:01:25 Done.
+ }
+ }
+ policy_exception_justification: "..."
Sergey Ulanov 2017/03/17 18:59:33 The product is shipped separate from Chrome, excep
Ramin Halavati 2017/04/03 10:01:26 Done.
+ })");
std::unique_ptr<UrlRequest> url_request =
transport_context_->url_request_factory()->CreateUrlRequest(
- UrlRequest::Type::GET, url);
+ UrlRequest::Type::GET, url, traffic_annotation);
url_request->AddHeader("X-Talk-Google-Relay-Auth: " +
ice_config_.relay_token);
url_request->AddHeader("X-Google-Relay-Auth: " + ice_config_.relay_token);

Powered by Google App Engine
This is Rietveld 408576698