82 lines
3.3 KiB
Diff
82 lines
3.3 KiB
Diff
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: Tue, 2 Jun 2015 11:01:50 +0200
|
|
Subject: updater: disable updater pings
|
|
|
|
Despite auto-updater being arguably disabled (see previous commit),
|
|
Chromium would still send background requests. Kill it.
|
|
(trk:170, trk:171)
|
|
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
.../component_updater_url_constants.cc | 4 ++--
|
|
components/component_updater/configurator_impl.cc | 10 ++++------
|
|
components/component_updater/configurator_impl.h | 1 -
|
|
3 files changed, 6 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/components/component_updater/component_updater_url_constants.cc b/components/component_updater/component_updater_url_constants.cc
|
|
--- a/components/component_updater/component_updater_url_constants.cc
|
|
+++ b/components/component_updater/component_updater_url_constants.cc
|
|
@@ -15,9 +15,9 @@ namespace component_updater {
|
|
// The value of |kDefaultUrlSource| can be overridden with
|
|
// --component-updater=url-source=someurl.
|
|
const char kUpdaterJSONDefaultUrl[] =
|
|
- "https://update.googleapis.com/service/update2/json";
|
|
+ "about:blank";
|
|
|
|
const char kUpdaterJSONFallbackUrl[] =
|
|
- "http://update.googleapis.com/service/update2/json";
|
|
+ "about:blank";
|
|
|
|
} // namespace component_updater
|
|
diff --git a/components/component_updater/configurator_impl.cc b/components/component_updater/configurator_impl.cc
|
|
--- a/components/component_updater/configurator_impl.cc
|
|
+++ b/components/component_updater/configurator_impl.cc
|
|
@@ -40,8 +40,7 @@ ConfiguratorImpl::ConfiguratorImpl(
|
|
: background_downloads_enabled_(config_policy.BackgroundDownloadsEnabled()),
|
|
deltas_enabled_(config_policy.DeltaUpdatesEnabled()),
|
|
fast_update_(config_policy.FastUpdate()),
|
|
- pings_enabled_(config_policy.PingsEnabled()),
|
|
- require_encryption_(require_encryption),
|
|
+ pings_enabled_(false),
|
|
url_source_override_(config_policy.UrlSourceOverride()),
|
|
initial_delay_(config_policy.InitialDelay()) {
|
|
if (config_policy.TestRequest()) {
|
|
@@ -77,22 +76,21 @@ base::TimeDelta ConfiguratorImpl::UpdateDelay() const {
|
|
|
|
std::vector<GURL> ConfiguratorImpl::UpdateUrl() const {
|
|
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
|
+ if ((true)) return std::vector<GURL>();
|
|
if (url_source_override_.is_valid()) {
|
|
return {GURL(url_source_override_)};
|
|
}
|
|
|
|
std::vector<GURL> urls{GURL(kUpdaterJSONDefaultUrl),
|
|
GURL(kUpdaterJSONFallbackUrl)};
|
|
- if (require_encryption_) {
|
|
- update_client::RemoveUnsecureUrls(&urls);
|
|
- }
|
|
+ update_client::RemoveUnsecureUrls(&urls);
|
|
|
|
return urls;
|
|
}
|
|
|
|
std::vector<GURL> ConfiguratorImpl::PingUrl() const {
|
|
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
|
- return pings_enabled_ ? UpdateUrl() : std::vector<GURL>();
|
|
+ return std::vector<GURL>();
|
|
}
|
|
|
|
const base::Version& ConfiguratorImpl::GetBrowserVersion() const {
|
|
diff --git a/components/component_updater/configurator_impl.h b/components/component_updater/configurator_impl.h
|
|
--- a/components/component_updater/configurator_impl.h
|
|
+++ b/components/component_updater/configurator_impl.h
|
|
@@ -107,7 +107,6 @@ class ConfiguratorImpl {
|
|
const bool deltas_enabled_;
|
|
const bool fast_update_;
|
|
const bool pings_enabled_;
|
|
- const bool require_encryption_;
|
|
const GURL url_source_override_;
|
|
const base::TimeDelta initial_delay_;
|
|
};
|
|
--
|