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

Unified Diff: google_apis/gcm/engine/checkin_request.cc

Issue 2737433002: Network traffic annotation added to goolge_apis/gcm/engine. (Closed)
Patch Set: 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
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 |
« no previous file with comments | « no previous file | google_apis/gcm/engine/registration_request.cc » ('j') | google_apis/gcm/engine/registration_request.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698