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

Unified Diff: chrome/browser/net/file_downloader.cc

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: Comments addressed. Created 3 years, 11 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: chrome/browser/net/file_downloader.cc
diff --git a/chrome/browser/net/file_downloader.cc b/chrome/browser/net/file_downloader.cc
index aa57047b7c2f62bbe5d959df52aacae95f794c74..7864aa9c1f8c459f17c3485f5a754dc0ab34509b 100644
--- a/chrome/browser/net/file_downloader.cc
+++ b/chrome/browser/net/file_downloader.cc
@@ -25,9 +25,33 @@ FileDownloader::FileDownloader(const GURL& url,
net::URLRequestContextGetter* request_context,
const DownloadFinishedCallback& callback)
: callback_(callback),
- fetcher_(URLFetcher::Create(url, URLFetcher::GET, this)),
local_path_(path),
weak_ptr_factory_(this) {
+ net::NetworkTrafficAnnotationTag traffic_annotation =
battre 2017/02/01 16:25:58 FileDownloader should take a net::NetworkTrafficAn
Ramin Halavati 2017/02/02 07:44:24 Done.
+ net::DefineNetworkTrafficAnnotation("", R"(
+ semantics {
+ sender: ""
+ description: ""
+ trigger: ""
+ data: ""
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store_exceptions: ""
+ setting: ""
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ })");
+ fetcher_.reset(URLFetcher::Create(url,
+ URLFetcher::GET,
+ this,
+ traffic_annotation).release());
+
fetcher_->SetRequestContext(request_context);
fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);

Powered by Google App Engine
This is Rietveld 408576698