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

Unified Diff: components/gcm_driver/gcm_channel_status_request.cc

Issue 2708863002: Network traffic annotation added to gcm_channel_status_request. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_channel_status_request.cc
diff --git a/components/gcm_driver/gcm_channel_status_request.cc b/components/gcm_driver/gcm_channel_status_request.cc
index 43c90eed2ced9358fe0878d38540ffff144af00b..f026a7bc8cd7f1b2c69774421efce1ecd16c9fc9 100644
--- a/components/gcm_driver/gcm_channel_status_request.cc
+++ b/components/gcm_driver/gcm_channel_status_request.cc
@@ -14,6 +14,7 @@
#include "net/base/escape.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"
#include "url/gurl.h"
@@ -67,8 +68,30 @@ void GCMChannelStatusRequest::Start() {
NOTREACHED();
}
- url_fetcher_ =
- net::URLFetcher::Create(request_url, net::URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
Peter Beverloo 2017/02/21 14:04:13 gcm_channel_status_request
Ramin Halavati 2017/02/21 14:17:50 Done.
+ semantics {
Peter Beverloo 2017/02/21 14:04:13 semantics { sender: "gcm_driver" description:
Ramin Halavati 2017/02/21 14:17:50 Done.
+ sender: "..."
+ description: "..."
+ trigger: "..."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: "..."
+ setting: "..."
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ policy_exception_justification: "..."
+ })");
+
+ url_fetcher_ = net::URLFetcher::Create(request_url, net::URLFetcher::POST,
+ this, traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
url_fetcher_.get(), data_use_measurement::DataUseUserData::GCM_DRIVER);
url_fetcher_->SetRequestContext(request_context_getter_.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698