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

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

Issue 2704383002: Network traffic annotation added to gcm_network_channel. (Closed)
Patch Set: Created 3 years, 10 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 5b2aafeb81a01c78ad6d420f9ff989f56673e8ed..fd9ebe1b6b22247141e0202c7e8c4e4c7a9e99b0 100644
--- a/components/invalidation/impl/gcm_network_channel.cc
+++ b/components/invalidation/impl/gcm_network_channel.cc
@@ -20,6 +20,7 @@
#include "components/invalidation/impl/gcm_network_channel_delegate.h"
#include "google_apis/gaia/google_service_auth_error.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"
@@ -217,8 +218,30 @@ 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("...", R"(
+ semantics {
+ sender: "..."
dcheng 2017/02/23 19:15:12 To help me understand, is this something that will
Ramin Halavati 2017/02/24 10:16:00 Sorry that the first message was not clear enough.
dcheng 2017/02/25 00:17:43 I see. I'm probably not a good reviewer for this C
pavely 2017/02/27 19:29:41 sender: Invalidation service
Ramin Halavati 2017/02/28 11:57:03 Done.
+ description: "..."
pavely 2017/02/27 19:29:41 Chrome uses cacheinvalidation library to receive p
Ramin Halavati 2017/02/28 11:57:03 Done.
+ trigger: "..."
pavely 2017/02/27 19:29:41 The first message is sent to register client with
Ramin Halavati 2017/02/28 11:57:03 Done.
+ data: "..."
Ramin Halavati 2017/02/28 11:57:04 Please specify what data is sent.
pavely 2017/02/28 18:38:49 No PII data is sent in this request. Request cont
Ramin Halavati 2017/03/01 08:35:02 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
pavely 2017/02/27 19:29:41 destination: GOOGLE_OWNED_SERVICE
Ramin Halavati 2017/03/01 08:35:01 Done.
+ }
+ policy {
+ cookies_allowed: false/true
pavely 2017/02/27 19:29:41 cookies_allowed: false
Ramin Halavati 2017/02/28 11:57:03 It seems to me that cookies are not disabled. If t
pavely 2017/02/28 18:38:49 I believe cookies are not required. Authentication
Ramin Halavati 2017/03/01 08:35:02 https://codereview.chromium.org/2723043002 created
+ cookies_store: "..."
+ setting: "..."
pavely 2017/02/27 19:29:41 Invalidation service is enabled by default. I don'
Ramin Halavati 2017/02/28 11:57:03 Isn't it disabled if Sync is disabled?
pavely 2017/02/28 18:38:49 Apart from Sync, InvalidationService is used by co
Ramin Halavati 2017/03/01 08:35:01 Acknowledged.
+ policy {
+ [POLICY_NAME] {
Ramin Halavati 2017/02/28 11:57:03 Isn't this related? http://dev.chromium.org/admin
pavely 2017/02/28 18:38:49 This policy disables sync, it doesn't affect other
Ramin Halavati 2017/03/01 08:35:02 Acknowledged.
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ policy_exception_justification: "..."
Ramin Halavati 2017/02/28 11:57:03 Do you think it's useful to have a policy to disab
pavely 2017/02/28 18:38:49 Disabling InvalidationService might break features
Ramin Halavati 2017/03/01 08:35:01 Done.
+ })");
+ 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