Chromium Code Reviews| Index: components/password_manager/core/browser/affiliation_fetcher.cc |
| diff --git a/components/password_manager/core/browser/affiliation_fetcher.cc b/components/password_manager/core/browser/affiliation_fetcher.cc |
| index 004c2213e522832dfbda32247408eded855fe170..2d6c6da2beadd1d6fe56caafb23868afd1a01f72 100644 |
| --- a/components/password_manager/core/browser/affiliation_fetcher.cc |
| +++ b/components/password_manager/core/browser/affiliation_fetcher.cc |
| @@ -16,6 +16,7 @@ |
| #include "net/base/load_flags.h" |
| #include "net/base/url_util.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 "url/gurl.h" |
| @@ -91,8 +92,28 @@ void AffiliationFetcher::SetFactoryForTesting( |
| void AffiliationFetcher::StartRequest() { |
| DCHECK(!fetcher_); |
| - fetcher_ = |
| - net::URLFetcher::Create(BuildQueryURL(), net::URLFetcher::POST, this); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("...", R"( |
|
vasilii
2017/02/21 10:37:58
android_affiliation
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + semantics { |
| + sender: "..." |
|
vasilii
2017/02/21 10:37:58
affiliation_fetcher
Ramin Halavati
2017/02/21 11:59:10
Done. Can it be "Android Affiliation Fetcher"?
vasilii
2017/02/21 12:03:20
I think it's confusing because it's running on des
engedy
2017/02/21 12:39:18
+1.
Ramin Halavati
2017/02/21 13:12:02
Done.
|
| + description: "..." |
|
vasilii
2017/02/21 10:37:58
For the users syncing their passwords to Google wi
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + trigger: "..." |
|
vasilii
2017/02/21 10:37:58
On startup.
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + data: "..." |
|
vasilii
2017/02/21 10:37:58
List of the Android apps the user has credentials
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
|
vasilii
2017/02/21 10:37:58
GOOGLE_OWNED_SERVICE
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + } |
| + policy { |
| + cookies_allowed: false |
| + setting: "..." |
|
vasilii
2017/02/21 10:37:58
One can either stop syncing the passwords to Googl
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + policy { |
| + [POLICY_NAME] { |
|
vasilii
2017/02/21 10:37:58
SyncDisabled
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
|
vasilii
2017/02/21 10:37:58
MANDATORY
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + value: ... |
|
vasilii
2017/02/21 10:37:58
True
Ramin Halavati
2017/02/21 11:59:10
Done.
|
| + } |
| + } |
| + policy_exception_justification: "..." |
| + })"); |
| + fetcher_ = net::URLFetcher::Create(BuildQueryURL(), net::URLFetcher::POST, |
| + this, traffic_annotation); |
| fetcher_->SetRequestContext(request_context_getter_.get()); |
| fetcher_->SetUploadData("application/x-protobuf", PreparePayload()); |
| fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES | |