Chromium Code Reviews| Index: google_apis/gcm/engine/registration_request.cc |
| diff --git a/google_apis/gcm/engine/registration_request.cc b/google_apis/gcm/engine/registration_request.cc |
| index 386af0e7eab3f55967901e5e066684f10acaaf75..191066390c88d6564abc835c46eb3102d6a6c31d 100644 |
| --- a/google_apis/gcm/engine/registration_request.cc |
| +++ b/google_apis/gcm/engine/registration_request.cc |
| @@ -20,6 +20,7 @@ |
| #include "net/base/load_flags.h" |
| #include "net/http/http_request_headers.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_context_getter.h" |
| #include "net/url_request/url_request_status.h" |
| @@ -144,9 +145,29 @@ RegistrationRequest::~RegistrationRequest() {} |
| void RegistrationRequest::Start() { |
| DCHECK(!callback_.is_null()); |
| DCHECK(!url_fetcher_.get()); |
| - |
| - url_fetcher_ = |
| - net::URLFetcher::Create(registration_url_, net::URLFetcher::POST, this); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
|
Peter Beverloo
2017/03/15 18:58:04
Proposal (gcm_registration):
semantics {
sender
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( |
| + registration_url_, net::URLFetcher::POST, this, traffic_annotation); |
| url_fetcher_->SetRequestContext(request_context_getter_.get()); |
| url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | |
| net::LOAD_DO_NOT_SAVE_COOKIES); |