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

Unified Diff: components/update_client/update_checker.cc

Issue 2206583007: Handle the case when the updates are disabled for a component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « components/update_client/test_configurator.cc ('k') | components/update_client/update_checker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_checker.cc
diff --git a/components/update_client/update_checker.cc b/components/update_client/update_checker.cc
index 95a6a2646f0b81b83f5d7458602630103248614b..406e1f06782e988c0cf1d2dc7d87c1850c8eb102 100644
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -86,13 +86,19 @@ std::string BuildUpdateCheckRequest(const Configurator& config,
base::StringAppendF(&app, " brand=\"%s\"", brand.c_str());
if (item->on_demand)
base::StringAppendF(&app, " installsource=\"ondemand\"");
-
- for (const auto& attr : installer_attributes)
+ for (const auto& attr : installer_attributes) {
base::StringAppendF(&app, " %s=\"%s\"", attr.first.c_str(),
attr.second.c_str());
-
+ }
base::StringAppendF(&app, ">");
- base::StringAppendF(&app, "<updatecheck />");
+
+ base::StringAppendF(&app, "<updatecheck");
+ if (item->component.supports_group_policy_enable_component_updates &&
+ !config.EnabledComponentUpdates()) {
+ base::StringAppendF(&app, " updatedisabled=\"true\"");
+ }
+ base::StringAppendF(&app, "/>");
+
base::StringAppendF(&app, "<ping rd=\"%d\" ping_freshness=\"%s\" />",
metadata->GetDateLastRollCall(item->id),
metadata->GetPingFreshness(item->id).c_str());
« no previous file with comments | « components/update_client/test_configurator.cc ('k') | components/update_client/update_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698