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

Unified Diff: components/update_client/update_checker.cc

Issue 2237153002: Use consistent values for enabled_component_updates throughout an update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UT. 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/update_checker.h ('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 406e1f06782e988c0cf1d2dc7d87c1850c8eb102..a5ec2662f4b4e8ba0bf4045c659c1f1f8ba3e7a8 100644
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -72,7 +72,8 @@ bool IsEncryptionRequired(const std::vector<CrxUpdateItem*>& items) {
std::string BuildUpdateCheckRequest(const Configurator& config,
const std::vector<CrxUpdateItem*>& items,
PersistedData* metadata,
- const std::string& additional_attributes) {
+ const std::string& additional_attributes,
+ bool enabled_component_updates) {
const std::string brand(SanitizeBrand(config.GetBrand()));
std::string app_elements;
for (size_t i = 0; i != items.size(); ++i) {
@@ -94,7 +95,7 @@ std::string BuildUpdateCheckRequest(const Configurator& config,
base::StringAppendF(&app, "<updatecheck");
if (item->component.supports_group_policy_enable_component_updates &&
- !config.EnabledComponentUpdates()) {
+ !enabled_component_updates) {
base::StringAppendF(&app, " updatedisabled=\"true\"");
}
base::StringAppendF(&app, "/>");
@@ -130,6 +131,7 @@ class UpdateCheckerImpl : public UpdateChecker {
bool CheckForUpdates(
const std::vector<CrxUpdateItem*>& items_to_check,
const std::string& additional_attributes,
+ bool enabled_component_updates,
const UpdateCheckCallback& update_check_callback) override;
private:
@@ -159,6 +161,7 @@ UpdateCheckerImpl::~UpdateCheckerImpl() {
bool UpdateCheckerImpl::CheckForUpdates(
const std::vector<CrxUpdateItem*>& items_to_check,
const std::string& additional_attributes,
+ bool enabled_component_updates,
const UpdateCheckCallback& update_check_callback) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -181,7 +184,7 @@ bool UpdateCheckerImpl::CheckForUpdates(
request_sender_->Send(
config_->EnabledCupSigning(),
BuildUpdateCheckRequest(*config_, items_to_check, metadata_,
- additional_attributes),
+ additional_attributes, enabled_component_updates),
urls, base::Bind(&UpdateCheckerImpl::OnRequestSenderComplete,
base::Unretained(this), base::Passed(&ids_checked)));
return true;
« no previous file with comments | « components/update_client/update_checker.h ('k') | components/update_client/update_checker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698