Index: google_apis/gcm/engine/checkin_request.cc |
diff --git a/google_apis/gcm/engine/checkin_request.cc b/google_apis/gcm/engine/checkin_request.cc |
index ad13923d72ece93221bd561bf5f1f6e92c6d766f..4c569788472ddd1f9f4a1e7215dc982c1d1ef99e 100644 |
--- a/google_apis/gcm/engine/checkin_request.cc |
+++ b/google_apis/gcm/engine/checkin_request.cc |
@@ -11,6 +11,7 @@ |
#include "google_apis/gcm/monitoring/gcm_stats_recorder.h" |
#include "google_apis/gcm/protocol/checkin.pb.h" |
#include "net/base/load_flags.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_request_status.h" |
@@ -144,9 +145,29 @@ void CheckinRequest::Start() { |
std::string upload_data; |
CHECK(request.SerializeToString(&upload_data)); |
- |
- url_fetcher_ = |
- net::URLFetcher::Create(checkin_url_, net::URLFetcher::POST, this); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
Peter Beverloo
2017/03/15 18:58:04
Proposal (gcm_checkin):
semantics {
sender: "GC
Ramin Halavati
2017/03/16 08:43:51
Done.
|
+ net::DefineNetworkTrafficAnnotation("...", R"( |
+ semantics { |
+ 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} |
+ [POLICY_NAME]: ... //(value to disable it) |
+ } |
+ } |
+ policy_exception_justification: "..." |
+ })"); |
+ url_fetcher_ = net::URLFetcher::Create(checkin_url_, net::URLFetcher::POST, |
+ this, traffic_annotation); |
url_fetcher_->SetRequestContext(request_context_getter_); |
url_fetcher_->SetUploadData(kRequestContentType, upload_data); |
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | |