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

Unified Diff: components/update_client/utils.cc

Issue 2798873002: Network traffic annotation added to update_client. (Closed)
Patch Set: Created 3 years, 8 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 42a2235082aced11055372f92d91039da181e9c4..effbdf9381a65d32da88a02de671a449fb77260b 100644
--- a/components/update_client/utils.cc
+++ b/components/update_client/utils.cc
@@ -35,6 +35,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"
@@ -188,8 +189,28 @@ 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("...", R"(
+ semantics {
+ sender: "..."
Sorin Jianu 2017/04/19 21:40:39 Component Updater
Ramin Halavati 2017/04/20 07:36:13 Done.
+ description: "..."
Sorin Jianu 2017/04/19 21:40:39 The component updater in Chrome is responsible for
Ramin Halavati 2017/04/20 07:36:13 Done.
+ trigger: "..."
Sorin Jianu 2017/04/19 21:40:39 Manual or automatic software updates.
Ramin Halavati 2017/04/20 07:36:13 Done.
+ data: "..."
Sorin Jianu 2017/04/19 21:40:40 Various OS and Chrome parameters such as version,
Ramin Halavati 2017/04/20 07:36:13 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
Sorin Jianu 2017/04/19 21:40:39 GOOGLE_OWNED_SERVICE
Ramin Halavati 2017/04/20 07:36:14 Done.
+ }
+ policy {
+ cookies_allowed: false
+ setting: "..."
Sorin Jianu 2017/04/19 21:40:39 This feature can't be disabled.
Ramin Halavati 2017/04/20 07:36:13 Done.
+ chrome_policy {
+ [POLICY_NAME] {
Sorin Jianu 2017/04/19 21:40:39 There is no policy associated with this feature.
Ramin Halavati 2017/04/20 07:36:14 Done.
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
+ })");
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