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

Unified Diff: components/update_client/utils.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
Index: components/update_client/utils.cc
diff --git a/components/update_client/utils.cc b/components/update_client/utils.cc
index 96e15a97c98a888990bd3c94f8ea93db468e8829..94f3e0ea07bd0304825e468e092bdb23f5c63c24 100644
--- a/components/update_client/utils.cc
+++ b/components/update_client/utils.cc
@@ -37,6 +37,7 @@
#include "crypto/secure_hash.h"
#include "crypto/sha2.h"
#include "net/base/load_flags.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 "net/url_request/url_request_status.h"
@@ -192,8 +193,36 @@ std::unique_ptr<net::URLFetcher> SendProtocolRequest(
const std::string& protocol_request,
net::URLFetcherDelegate* url_fetcher_delegate,
net::URLRequestContextGetter* url_request_context_getter) {
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("component_updater_utils", 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:
+ "Various OS and Chrome parameters such as version, bitness, "
+ "release tracks, etc."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be disabled."
+ chrome_policy {
+ ComponentUpdatesEnabled {
+ policy_options {mode: MANDATORY}
+ ComponentUpdatesEnabled: false
+ }
+ }
+ })");
std::unique_ptr<net::URLFetcher> url_fetcher = net::URLFetcher::Create(
- 0, url, net::URLFetcher::POST, url_fetcher_delegate);
+ 0, url, net::URLFetcher::POST, url_fetcher_delegate, traffic_annotation);
if (!url_fetcher.get())
return url_fetcher;

Powered by Google App Engine
This is Rietveld 408576698