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

Unified Diff: components/autofill/core/browser/autofill_download_manager.cc

Issue 2740213003: Network traffic annotation added to autofill_download_manager. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698