Commit 7b72d81c authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Add network traffic annotation to components/invalidation.

Network traffic annotation is added to two requests in:
components/invalidation/impl/p2p_invalidator.cc
components/invalidation/impl/push_client_channel.cc

Bug: 656607
Change-Id: I34b9dbc22b8d4035270f66225d2424c624bb6217
Reviewed-on: https://chromium-review.googlesource.com/926008
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541751}
parent 86dad9f3
...@@ -203,9 +203,41 @@ void P2PInvalidator::UpdateCredentials( ...@@ -203,9 +203,41 @@ void P2PInvalidator::UpdateCredentials(
notifier::SubscriptionList(1, subscription)); notifier::SubscriptionList(1, subscription));
// If already logged in, the new credentials will take effect on the // If already logged in, the new credentials will take effect on the
// next reconnection. // next reconnection.
// TODO(https://crbug.com/656607): Add proper annotation here. net::NetworkTrafficAnnotationTag traffic_annotation =
push_client_->UpdateCredentials(email, token, net::DefineNetworkTrafficAnnotation("p2p_invalidator", R"(
NO_TRAFFIC_ANNOTATION_BUG_656607); semantics {
sender: "P2P Invalidator"
description:
"Chromium uses cacheinvalidation library to receive push "
"notifications from the server about sync items (bookmarks, "
"passwords, preferences, etc.) modified on other clients. It uses "
"XMPP PushClient to communicate with server."
trigger:
"Initial communication happens after browser startup to register "
"client device with server and update online status. Consecutive "
"communications are triggered by heartbeat timer and push "
"notifications from server."
data:
"Protocol buffers including server generated client_token, "
"ObjectIds identifying subscriptions, and versions for these "
"subscriptions. ObjectId is not unique to user. Version is not "
"related to sync data, it is an internal concept of invalidations "
"protocol."
destination: OTHER
destination_other:
"The P2P client that user is connected to."
}
policy {
cookies_allowed: NO
setting:
"This feature is only used for integration testing, never used in "
"released Chrome."
policy_exception_justification:
"This feature is only used for integration testing, never used in "
"released Chrome."
}
)");
push_client_->UpdateCredentials(email, token, traffic_annotation);
logged_in_ = true; logged_in_ = true;
} }
......
...@@ -43,9 +43,41 @@ PushClientChannel::~PushClientChannel() { ...@@ -43,9 +43,41 @@ PushClientChannel::~PushClientChannel() {
void PushClientChannel::UpdateCredentials( void PushClientChannel::UpdateCredentials(
const std::string& email, const std::string& token) { const std::string& email, const std::string& token) {
// TODO(https://crbug.com/656607): Add proper annotation. net::NetworkTrafficAnnotationTag traffic_annotation =
push_client_->UpdateCredentials(email, token, net::DefineNetworkTrafficAnnotation("puch_client_channel", R"(
NO_TRAFFIC_ANNOTATION_BUG_656607); semantics {
sender: "Push Client Channel"
description:
"Chromium uses cacheinvalidation library to receive push "
"notifications from the server about sync items (bookmarks, "
"passwords, preferences, etc.) modified on other clients. It uses "
"XMPP PushClient to communicate with server."
trigger:
"Initial communication happens after browser startup to register "
"client device with server and update online status. Consecutive "
"communications are triggered by heartbeat timer and push "
"notifications from server."
data:
"Protocol buffers including server generated client_token, "
"ObjectIds identifying subscriptions, and versions for these "
"subscriptions. ObjectId is not unique to user. Version is not "
"related to sync data, it is an internal concept of invalidations "
"protocol."
destination: GOOGLE_OWNED_SERVICE
}
policy {
cookies_allowed: NO
setting:
"This feature is disabled by default and cannot be enabled by "
"settings. It is controlled by sync server experiments."
chrome_policy {
SyncDisabled {
SyncDisabled: true
}
}
}
)");
push_client_->UpdateCredentials(email, token, traffic_annotation);
} }
int PushClientChannel::GetInvalidationClientType() { int PushClientChannel::GetInvalidationClientType() {
......
...@@ -156,6 +156,7 @@ Refer to README.md for content description and update process. ...@@ -156,6 +156,7 @@ Refer to README.md for content description and update process.
<item id="omnibox_zerosuggest_experimental" hash_code="3813491" type="0" content_hash_code="22929259" os_list="linux,windows" file_path="components/omnibox/browser/contextual_suggestions_service.cc"/> <item id="omnibox_zerosuggest_experimental" hash_code="3813491" type="0" content_hash_code="22929259" os_list="linux,windows" file_path="components/omnibox/browser/contextual_suggestions_service.cc"/>
<item id="one_google_bar_service" hash_code="78917933" type="0" content_hash_code="46527252" os_list="linux,windows" file_path="chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc"/> <item id="one_google_bar_service" hash_code="78917933" type="0" content_hash_code="46527252" os_list="linux,windows" file_path="chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc"/>
<item id="open_search" hash_code="107267424" type="0" content_hash_code="25715812" os_list="linux,windows" file_path="components/search_engines/template_url_fetcher.cc"/> <item id="open_search" hash_code="107267424" type="0" content_hash_code="25715812" os_list="linux,windows" file_path="components/search_engines/template_url_fetcher.cc"/>
<item id="p2p_invalidator" hash_code="84201371" type="0" content_hash_code="117416248" os_list="linux,windows" file_path="components/invalidation/impl/p2p_invalidator.cc"/>
<item id="parallel_download_job" hash_code="135118587" type="0" content_hash_code="105330419" os_list="linux,windows" file_path="content/browser/download/parallel_download_job.cc"/> <item id="parallel_download_job" hash_code="135118587" type="0" content_hash_code="105330419" os_list="linux,windows" file_path="content/browser/download/parallel_download_job.cc"/>
<item id="password_protection_request" hash_code="66322287" type="0" content_hash_code="21270837" os_list="linux,windows" file_path="components/safe_browsing/password_protection/password_protection_request.cc"/> <item id="password_protection_request" hash_code="66322287" type="0" content_hash_code="21270837" os_list="linux,windows" file_path="components/safe_browsing/password_protection/password_protection_request.cc"/>
<item id="payment_instrument_icon_fetcher" hash_code="73309970" type="0" deprecated="2017-09-16" content_hash_code="84709873" file_path=""/> <item id="payment_instrument_icon_fetcher" hash_code="73309970" type="0" deprecated="2017-09-16" content_hash_code="84709873" file_path=""/>
...@@ -176,6 +177,7 @@ Refer to README.md for content description and update process. ...@@ -176,6 +177,7 @@ Refer to README.md for content description and update process.
<item id="profile_avatar" hash_code="51164680" type="0" content_hash_code="113550845" os_list="linux,windows" file_path="chrome/browser/profiles/profile_avatar_downloader.cc"/> <item id="profile_avatar" hash_code="51164680" type="0" content_hash_code="113550845" os_list="linux,windows" file_path="chrome/browser/profiles/profile_avatar_downloader.cc"/>
<item id="profile_resetter_upload" hash_code="105330607" type="0" content_hash_code="129329171" os_list="linux,windows" file_path="chrome/browser/profile_resetter/reset_report_uploader.cc"/> <item id="profile_resetter_upload" hash_code="105330607" type="0" content_hash_code="129329171" os_list="linux,windows" file_path="chrome/browser/profile_resetter/reset_report_uploader.cc"/>
<item id="proxy_script_fetcher" hash_code="37531401" type="0" content_hash_code="31866133" os_list="linux,windows" file_path="net/proxy_resolution/pac_file_fetcher_impl.cc"/> <item id="proxy_script_fetcher" hash_code="37531401" type="0" content_hash_code="31866133" os_list="linux,windows" file_path="net/proxy_resolution/pac_file_fetcher_impl.cc"/>
<item id="puch_client_channel" hash_code="34459548" type="0" content_hash_code="92475475" os_list="linux,windows" file_path="components/invalidation/impl/push_client_channel.cc"/>
<item id="quic_chromium_incoming_session" hash_code="87635401" type="0" content_hash_code="78573093" os_list="linux,windows" file_path="net/quic/chromium/quic_chromium_client_session.cc"/> <item id="quic_chromium_incoming_session" hash_code="87635401" type="0" content_hash_code="78573093" os_list="linux,windows" file_path="net/quic/chromium/quic_chromium_client_session.cc"/>
<item id="quic_chromium_packet_writer" hash_code="20153177" type="0" content_hash_code="29657765" os_list="linux,windows" file_path="net/quic/chromium/quic_chromium_packet_writer.cc"/> <item id="quic_chromium_packet_writer" hash_code="20153177" type="0" content_hash_code="29657765" os_list="linux,windows" file_path="net/quic/chromium/quic_chromium_packet_writer.cc"/>
<item id="ranker_url_fetcher" hash_code="95682324" type="0" content_hash_code="45958626" os_list="linux,windows" file_path="components/assist_ranker/ranker_url_fetcher.cc"/> <item id="ranker_url_fetcher" hash_code="95682324" type="0" content_hash_code="45958626" os_list="linux,windows" file_path="components/assist_ranker/ranker_url_fetcher.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