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

Unified Diff: components/update_client/url_fetcher_downloader.cc

Issue 2798873002: Network traffic annotation added to update_client. (Closed)
Patch Set: Annotations updated. Created 3 years, 7 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 | components/update_client/utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/url_fetcher_downloader.cc
diff --git a/components/update_client/url_fetcher_downloader.cc b/components/update_client/url_fetcher_downloader.cc
index 4dcd36e65e4c3e0c3e6801fb56e6e18440246cc9..57fb50d704f1133e8fff9631f314a76d193a9183 100644
--- a/components/update_client/url_fetcher_downloader.cc
+++ b/components/update_client/url_fetcher_downloader.cc
@@ -15,6 +15,7 @@
#include "components/data_use_measurement/core/data_use_user_data.h"
#include "components/update_client/utils.h"
#include "net/base/load_flags.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "url/gurl.h"
@@ -36,7 +37,36 @@ UrlFetcherDownloader::~UrlFetcherDownloader() {
void UrlFetcherDownloader::DoStartDownload(const GURL& url) {
DCHECK(thread_checker_.CalledOnValidThread());
- url_fetcher_ = net::URLFetcher::Create(0, url, net::URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("url_fetcher_downloader", R"(
+ semantics {
+ sender: "Component Updater"
+ description:
+ "The component updater in Chrome is responsible for updating code "
+ "and data modules such as Flash, CrlSet, Origin Trials, etc. These "
+ "modules are updated on cycles independent of the Chrome release "
+ "tracks. It runs in the browser process and communicates with a "
+ "set of servers using the Omaha protocol to find the latest "
+ "versions of components, download them, and register them with the "
+ "rest of Chrome."
+ trigger: "Manual or automatic software updates."
+ data:
+ "The URL that refers to a component. It is obfuscated for most "
+ "components."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be disabled."
waffles 2017/05/18 16:13:10 nit: the protocol buffer comments say to use "NA".
+ chrome_policy {
+ ComponentUpdatesEnabled {
+ policy_options {mode: MANDATORY}
+ ComponentUpdatesEnabled: false
+ }
+ }
+ })");
+ url_fetcher_ = net::URLFetcher::Create(0, url, net::URLFetcher::GET, this,
+ traffic_annotation);
url_fetcher_->SetRequestContext(context_getter_);
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES |
« no previous file with comments | « no previous file | components/update_client/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698