chromium/chrome/browser/upgrade_detector/get_installed_version.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UPGRADE_DETECTOR_GET_INSTALLED_VERSION_H_
#define CHROME_BROWSER_UPGRADE_DETECTOR_GET_INSTALLED_VERSION_H_

#include <optional>

#include "base/functional/callback_forward.h"
#include "base/version.h"

struct InstalledAndCriticalVersion {};

// A platform-specific function that invokes a callback with the currently
// installed version and an optional critical version.
InstalledVersionCallback;

// Triggers the callback with the currently installed version and an optional
// critical version (Windows only as of this writing). This function may block
// the thread on which it runs.
void GetInstalledVersion(InstalledVersionCallback callback);

#endif  // CHROME_BROWSER_UPGRADE_DETECTOR_GET_INSTALLED_VERSION_H_