Chromium Code Reviews| Index: components/autofill/core/browser/autofill_download_manager.cc |
| diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/components/autofill/core/browser/autofill_download_manager.cc |
| index 07084c52be49d39dcfe3cd57cda9e02a79775cbd..8abd376929e3f3e3122d13f0f0ff69f58e3225e0 100644 |
| --- a/components/autofill/core/browser/autofill_download_manager.cc |
| +++ b/components/autofill/core/browser/autofill_download_manager.cc |
| @@ -24,6 +24,7 @@ |
| #include "net/http/http_request_headers.h" |
| #include "net/http/http_response_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 "url/gurl.h" |
| @@ -231,10 +232,33 @@ bool AutofillDownloadManager::StartRequest( |
| DCHECK(request_context); |
| GURL request_url = GetRequestUrl(request_data.request_type); |
| + net::NetworkTrafficAnnotationTag traffic_annotation = |
| + net::DefineNetworkTrafficAnnotation("...", R"( |
| + semantics { |
| + sender: "..." |
| + description: "..." |
| + trigger: "..." |
| + data: "..." |
| + destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER |
| + } |
| + policy { |
| + cookies_allowed: false/true |
| + cookies_store: "..." |
| + setting: "..." |
| + chrome_policy { |
| + [POLICY_NAME] { |
| + policy_options {mode: MANDATORY/RECOMMENDED/UNSET} |
| + [POLICY_NAME]: ... //(value to disable it) |
| + } |
| + } |
| + policy_exception_justification: "..." |
| + })"); |
|
Roger McFarlane (Chromium)
2017/03/15 14:54:56
There are actuallly two different requests that ca
|
| + |
| // Id is ignored for regular chrome, in unit test id's for fake fetcher |
| // factory will be 0, 1, 2, ... |
| - std::unique_ptr<net::URLFetcher> owned_fetcher = net::URLFetcher::Create( |
| - fetcher_id_for_unittest_++, request_url, net::URLFetcher::POST, this); |
| + std::unique_ptr<net::URLFetcher> owned_fetcher = |
| + net::URLFetcher::Create(fetcher_id_for_unittest_++, request_url, |
| + net::URLFetcher::POST, this, traffic_annotation); |
| net::URLFetcher* fetcher = owned_fetcher.get(); |
| data_use_measurement::DataUseUserData::AttachToFetcher( |
| fetcher, data_use_measurement::DataUseUserData::AUTOFILL); |