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

Unified Diff: components/invalidation/impl/gcm_network_channel.cc

Issue 2704383002: Network traffic annotation added to gcm_network_channel. (Closed)
Patch Set: Annotation 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 | « components/invalidation/impl/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/impl/gcm_network_channel.cc
diff --git a/components/invalidation/impl/gcm_network_channel.cc b/components/invalidation/impl/gcm_network_channel.cc
index 033843c4ec2f8999febb1da5b6cc41ee6d7fada1..47b95b4dda26bad055e08a4efa09903abbcf18e0 100644
--- a/components/invalidation/impl/gcm_network_channel.cc
+++ b/components/invalidation/impl/gcm_network_channel.cc
@@ -21,6 +21,7 @@
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_status.h"
@@ -218,8 +219,45 @@ void GCMNetworkChannel::OnGetTokenComplete(
access_token_ = token;
DVLOG(2) << "Got access token, sending message";
- fetcher_ = net::URLFetcher::Create(BuildUrl(registration_id_),
- net::URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("invalidation_service", R"(
+ semantics {
+ sender: "Invalidation service"
+ 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 "
+ "GCMClient to receive incoming messages. This request is used for "
+ "client-to-server communications."
+ trigger:
+ "The first message is sent to register client with the server on "
+ "Chromium startup. It is then sent periodically to confirm that "
+ "the client is still online. After receiving notification about "
+ "server changes, the client sends this request to acknowledge that "
+ "the notification is processed."
+ data:
+ "Different in each use case:\n"
+ "- Initial registration: Doesn't contain user data.\n"
+ "- Updating the set of subscriptions: Contains server generated "
+ "client_token and ObjectIds identifying subscriptions. ObjectId "
+ "is not unique to user.\n"
+ "- Invalidation acknowledgement: Contains client_token, ObjectId "
+ "and server version for corresponding subscription. Version is not "
+ "related to sync data, it is an internal concept of invalidations "
+ "protocol."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be disabled."
+ policy_exception_justification:
+ "Not implemented. Disabling InvalidationService might break "
+ "features that depend on it. It makes sense to control top level "
+ "features that use InvalidationService."
+ })");
+ fetcher_ =
+ net::URLFetcher::Create(BuildUrl(registration_id_), net::URLFetcher::POST,
+ this, traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
fetcher_.get(), data_use_measurement::DataUseUserData::INVALIDATION);
fetcher_->SetRequestContext(request_context_getter_.get());
« no previous file with comments | « components/invalidation/impl/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698