Commit 52f11054 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Add traffic annotation to CastChannelSendFunction::AsyncWorkStart().

Network traffic annotation is added to
CastChannelSendFunction::AsyncWorkStart().

Bug: 656607
Change-Id: I586c029890d07d922f159db10fbec27bc4d549b4
Reviewed-on: https://chromium-review.googlesource.com/911388
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarDerek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536671}
parent 8ee87963
...@@ -408,10 +408,42 @@ void CastChannelSendFunction::AsyncWorkStart() { ...@@ -408,10 +408,42 @@ void CastChannelSendFunction::AsyncWorkStart() {
AsyncWorkCompleted(); AsyncWorkCompleted();
return; return;
} }
// TODO(https://crbug.com/656607): Add proper annotation.
net::NetworkTrafficAnnotationTag traffic_annotation =
net::DefineNetworkTrafficAnnotation("cast_channel_send", R"(
semantics {
sender: "Cast Channel"
description:
"A Cast protocol or application-level message sent to a Cast "
"device."
trigger:
"Triggered by user gesture from using Cast functionality, or "
"a webpage using the Presentation API, or "
"Cast device discovery internal logic."
data:
"A serialized Cast protocol or application-level protobuf message. "
"A non-exhaustive list of Cast protocol messages:\n"
"- Virtual connection requests,\n"
"- App availability / media status / receiver status requests,\n"
"- Launch / stop Cast session requests,\n"
"- Media commands, such as play/pause.\n"
"Application-level messages may contain data specific to the Cast "
"application."
destination: OTHER
destination_other:
"Data will be sent to a Cast device in local network."
}
policy {
cookies_allowed: NO
setting:
"This request cannot be disabled, but it would not be sent if user "
"does not connect a Cast device to the local network."
policy_exception_justification: "Not implemented."
})");
socket->transport()->SendMessage( socket->transport()->SendMessage(
message_to_send, base::Bind(&CastChannelSendFunction::OnSend, this), message_to_send, base::Bind(&CastChannelSendFunction::OnSend, this),
NO_TRAFFIC_ANNOTATION_BUG_656607); traffic_annotation);
} }
void CastChannelSendFunction::OnSend(int result) { void CastChannelSendFunction::OnSend(int result) {
......
...@@ -43799,6 +43799,7 @@ Called by update_traffic_annotation_histograms.py.--> ...@@ -43799,6 +43799,7 @@ Called by update_traffic_annotation_histograms.py.-->
<int value="102819690" label="sync_file_system"/> <int value="102819690" label="sync_file_system"/>
<int value="102935425" label="safe_browsing_client_side_malware_detector"/> <int value="102935425" label="safe_browsing_client_side_malware_detector"/>
<int value="103133150" label="icon_cacher"/> <int value="103133150" label="icon_cacher"/>
<int value="103172229" label="cast_channel_send"/>
<int value="104798869" label="autofill_upload"/> <int value="104798869" label="autofill_upload"/>
<int value="105330607" label="profile_resetter_upload"/> <int value="105330607" label="profile_resetter_upload"/>
<int value="106124561" label="ssl_hmac_channel_authenticator"/> <int value="106124561" label="ssl_hmac_channel_authenticator"/>
...@@ -29,6 +29,7 @@ Refer to README.md for content description and update process. ...@@ -29,6 +29,7 @@ Refer to README.md for content description and update process.
<item id="bluetooth_socket" hash_code="94099818" type="0" content_hash_code="30932349" os_list="linux,windows" file_path="device/bluetooth/bluetooth_socket_net.cc"/> <item id="bluetooth_socket" hash_code="94099818" type="0" content_hash_code="30932349" os_list="linux,windows" file_path="device/bluetooth/bluetooth_socket_net.cc"/>
<item id="brandcode_config" hash_code="109679553" type="0" content_hash_code="128843792" os_list="linux,windows" file_path="chrome/browser/profile_resetter/brandcode_config_fetcher.cc"/> <item id="brandcode_config" hash_code="109679553" type="0" content_hash_code="128843792" os_list="linux,windows" file_path="chrome/browser/profile_resetter/brandcode_config_fetcher.cc"/>
<item id="captive_portal_service" hash_code="88754904" type="0" content_hash_code="70737580" os_list="linux,windows" file_path="chrome/browser/captive_portal/captive_portal_service.cc"/> <item id="captive_portal_service" hash_code="88754904" type="0" content_hash_code="70737580" os_list="linux,windows" file_path="chrome/browser/captive_portal/captive_portal_service.cc"/>
<item id="cast_channel_send" hash_code="103172229" type="0" content_hash_code="33946302" os_list="linux,windows" file_path="extensions/browser/api/cast_channel/cast_channel_api.cc"/>
<item id="cast_keep_alive_delegate" hash_code="134755844" type="0" content_hash_code="66118796" os_list="linux,windows" file_path="components/cast_channel/keep_alive_delegate.cc"/> <item id="cast_keep_alive_delegate" hash_code="134755844" type="0" content_hash_code="66118796" os_list="linux,windows" file_path="components/cast_channel/keep_alive_delegate.cc"/>
<item id="cast_message_handler" hash_code="87558948" type="0" content_hash_code="49684899" os_list="linux,windows" file_path="components/cast_channel/cast_message_handler.cc"/> <item id="cast_message_handler" hash_code="87558948" type="0" content_hash_code="49684899" os_list="linux,windows" file_path="components/cast_channel/cast_message_handler.cc"/>
<item id="cast_socket" hash_code="115192205" type="0" content_hash_code="63056899" os_list="linux,windows" file_path="components/cast_channel/cast_socket.cc"/> <item id="cast_socket" hash_code="115192205" type="0" content_hash_code="63056899" os_list="linux,windows" file_path="components/cast_channel/cast_socket.cc"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment