#include "components/update_client/update_client.h"
#include <algorithm>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/update_client/configurator.h"
#include "components/update_client/crx_update_item.h"
#include "components/update_client/persisted_data.h"
#include "components/update_client/ping_manager.h"
#include "components/update_client/protocol_definition.h"
#include "components/update_client/protocol_parser.h"
#include "components/update_client/task_check_for_update.h"
#include "components/update_client/task_send_ping.h"
#include "components/update_client/task_update.h"
#include "components/update_client/update_checker.h"
#include "components/update_client/update_client_errors.h"
#include "components/update_client/update_client_internal.h"
#include "components/update_client/update_engine.h"
#include "components/update_client/utils.h"
#include "url/gurl.h"
namespace update_client {
CrxInstaller::InstallParams::InstallParams(
const std::string& run,
const std::string& arguments,
const std::string& server_install_data)
: … { … }
CrxUpdateItem::CrxUpdateItem() : … { … }
CrxUpdateItem::CrxUpdateItem(const CrxUpdateItem& other) = default;
CrxUpdateItem& CrxUpdateItem::operator=(const CrxUpdateItem& other) = default;
CrxUpdateItem::~CrxUpdateItem() = default;
CrxComponent::CrxComponent() = default;
CrxComponent::CrxComponent(const CrxComponent& other) = default;
CrxComponent& CrxComponent::operator=(const CrxComponent& other) = default;
CrxComponent::~CrxComponent() = default;
UpdateClientImpl::UpdateClientImpl(
scoped_refptr<Configurator> config,
scoped_refptr<PingManager> ping_manager,
UpdateChecker::Factory update_checker_factory)
: … { … }
UpdateClientImpl::~UpdateClientImpl() { … }
base::RepeatingClosure UpdateClientImpl::Install(
const std::string& id,
CrxDataCallback crx_data_callback,
CrxStateChangeCallback crx_state_change_callback,
Callback callback) { … }
void UpdateClientImpl::Update(const std::vector<std::string>& ids,
CrxDataCallback crx_data_callback,
CrxStateChangeCallback crx_state_change_callback,
bool is_foreground,
Callback callback) { … }
void UpdateClientImpl::CheckForUpdate(
const std::string& id,
CrxDataCallback crx_data_callback,
CrxStateChangeCallback crx_state_change_callback,
bool is_foreground,
Callback callback) { … }
void UpdateClientImpl::RunTask(scoped_refptr<Task> task) { … }
void UpdateClientImpl::RunOrEnqueueTask(scoped_refptr<Task> task) { … }
void UpdateClientImpl::OnTaskComplete(Callback callback,
scoped_refptr<Task> task,
Error error) { … }
void UpdateClientImpl::AddObserver(Observer* observer) { … }
void UpdateClientImpl::RemoveObserver(Observer* observer) { … }
void UpdateClientImpl::NotifyObservers(Observer::Events event,
const std::string& id) { … }
bool UpdateClientImpl::GetCrxUpdateState(const std::string& id,
CrxUpdateItem* update_item) const { … }
bool UpdateClientImpl::IsUpdating(const std::string& id) const { … }
void UpdateClientImpl::Stop() { … }
void UpdateClientImpl::SendPing(const CrxComponent& crx_component,
PingParams ping_params,
Callback callback) { … }
scoped_refptr<UpdateClient> UpdateClientFactory(
scoped_refptr<Configurator> config) { … }
void RegisterPrefs(PrefRegistrySimple* registry) { … }
void RegisterProfilePrefs(PrefRegistrySimple* registry) { … }
}