#include "chrome/browser/upgrade_detector/installed_version_poller.h"
#include <stdint.h>
#include <string>
#include <utility>
#include <vector>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "chrome/browser/upgrade_detector/build_state.h"
#include "chrome/browser/upgrade_detector/get_installed_version.h"
#include "chrome/browser/upgrade_detector/installed_version_monitor.h"
#include "chrome/common/chrome_switches.h"
#include "components/version_info/version_info.h"
namespace {
bool g_disabled_for_testing = …;
constexpr uint32_t kSimulateUpgrade = …;
constexpr uint32_t kSimulateCriticalUpdate = …;
uint32_t GetTestingOptions() { … }
void SimulateGetInstalledVersion(uint32_t testing_options,
InstalledVersionCallback callback) { … }
InstalledVersionPoller::GetInstalledVersionCallback
GetGetInstalledVersionCallback() { … }
base::TimeDelta GetPollingInterval() { … }
}
InstalledVersionPoller::ScopedDisableForTesting::ScopedDisableForTesting() { … }
InstalledVersionPoller::ScopedDisableForTesting::~ScopedDisableForTesting() { … }
enum class InstalledVersionPoller::PollType { … };
const base::TimeDelta InstalledVersionPoller::kDefaultPollingInterval = …;
InstalledVersionPoller::InstalledVersionPoller(BuildState* build_state)
: … { … }
InstalledVersionPoller::InstalledVersionPoller(
BuildState* build_state,
GetInstalledVersionCallback get_installed_version,
std::unique_ptr<InstalledVersionMonitor> monitor,
const base::TickClock* tick_clock)
: … { … }
InstalledVersionPoller::~InstalledVersionPoller() { … }
void InstalledVersionPoller::StartMonitor(
std::unique_ptr<InstalledVersionMonitor> monitor) { … }
void InstalledVersionPoller::OnMonitorResult(bool error) { … }
void InstalledVersionPoller::Poll(PollType poll_type) { … }
void InstalledVersionPoller::OnInstalledVersion(
PollType poll_type,
InstalledAndCriticalVersion versions) { … }