#include "chrome/updater/configurator.h"
#include <algorithm>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/containers/flat_map.h"
#include "base/enterprise_util.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/rand_util.h"
#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "base/version.h"
#include "build/build_config.h"
#include "chrome/updater/activity.h"
#include "chrome/updater/constants.h"
#include "chrome/updater/crx_downloader_factory.h"
#include "chrome/updater/external_constants.h"
#include "chrome/updater/net/network.h"
#include "chrome/updater/persisted_data.h"
#include "chrome/updater/policy/service.h"
#include "chrome/updater/prefs.h"
#include "chrome/updater/updater_scope.h"
#include "chrome/updater/util/util.h"
#include "components/crx_file/crx_verifier.h"
#include "components/prefs/pref_service.h"
#include "components/update_client/network.h"
#include "components/update_client/patch/in_process_patcher.h"
#include "components/update_client/patcher.h"
#include "components/update_client/protocol_handler.h"
#include "components/update_client/unzip/in_process_unzipper.h"
#include "components/update_client/unzipper.h"
#include "components/version_info/version_info.h"
#include "url/gurl.h"
#if BUILDFLAG(IS_WIN)
#include "base/win/win_util.h"
#endif
namespace updater {
Configurator::Configurator(scoped_refptr<UpdaterPrefs> prefs,
scoped_refptr<ExternalConstants> external_constants)
: … { … }
Configurator::~Configurator() = default;
base::TimeDelta Configurator::InitialDelay() const { … }
base::TimeDelta Configurator::ServerKeepAliveTime() const { … }
base::TimeDelta Configurator::NextCheckDelay() const { … }
base::TimeDelta Configurator::OnDemandDelay() const { … }
base::TimeDelta Configurator::UpdateDelay() const { … }
std::vector<GURL> Configurator::UpdateUrl() const { … }
std::vector<GURL> Configurator::PingUrl() const { … }
GURL Configurator::CrashUploadURL() const { … }
GURL Configurator::DeviceManagementURL() const { … }
std::string Configurator::GetProdId() const { … }
base::Version Configurator::GetBrowserVersion() const { … }
std::string Configurator::GetChannel() const { … }
std::string Configurator::GetLang() const { … }
std::string Configurator::GetOSLongName() const { … }
base::flat_map<std::string, std::string> Configurator::ExtraRequestParams()
const { … }
std::string Configurator::GetDownloadPreference() const { … }
scoped_refptr<update_client::NetworkFetcherFactory>
Configurator::GetNetworkFetcherFactory() { … }
scoped_refptr<update_client::CrxDownloaderFactory>
Configurator::GetCrxDownloaderFactory() { … }
scoped_refptr<update_client::UnzipperFactory>
Configurator::GetUnzipperFactory() { … }
scoped_refptr<update_client::PatcherFactory> Configurator::GetPatcherFactory() { … }
bool Configurator::EnabledDeltas() const { … }
bool Configurator::EnabledBackgroundDownloader() const { … }
bool Configurator::EnabledCupSigning() const { … }
PrefService* Configurator::GetPrefService() const { … }
update_client::PersistedData* Configurator::GetPersistedData() const { … }
scoped_refptr<PersistedData> Configurator::GetUpdaterPersistedData() const { … }
bool Configurator::IsPerUserInstall() const { … }
std::unique_ptr<update_client::ProtocolHandlerFactory>
Configurator::GetProtocolHandlerFactory() const { … }
std::optional<bool> Configurator::IsMachineExternallyManaged() const { … }
scoped_refptr<PolicyService> Configurator::GetPolicyService() const { … }
crx_file::VerifierFormat Configurator::GetCrxVerifierFormat() const { … }
update_client::UpdaterStateProvider Configurator::GetUpdaterStateProvider()
const { … }
std::optional<base::FilePath> Configurator::GetCrxCachePath() const { … }
bool Configurator::IsConnectionMetered() const { … }
}