chromium/extensions/browser/updater/update_service.cc

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

#include "extensions/browser/updater/update_service.h"

#include <algorithm>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "base/barrier_closure.h"
#include "base/feature_list.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "components/update_client/crx_update_item.h"
#include "components/update_client/protocol_definition.h"
#include "components/update_client/update_client.h"
#include "components/update_client/update_client_errors.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/updater/extension_downloader.h"
#include "extensions/browser/updater/extension_update_data.h"
#include "extensions/browser/updater/scoped_extension_updater_keep_alive.h"
#include "extensions/browser/updater/update_data_provider.h"
#include "extensions/browser/updater/update_service_factory.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extension_id.h"

namespace extensions {

namespace {

UpdateService* update_service_override =;

// This set contains all Omaha attributes that is associated with extensions.
constexpr const char* kOmahaAttributes[] =;

}  // namespace

UpdateService::InProgressUpdate::InProgressUpdate(base::OnceClosure callback,
                                                  bool install_immediately)
    :{}
UpdateService::InProgressUpdate::~InProgressUpdate() = default;

UpdateService::InProgressUpdate::InProgressUpdate(
    UpdateService::InProgressUpdate&& other) = default;
UpdateService::InProgressUpdate& UpdateService::InProgressUpdate::operator=(
    UpdateService::InProgressUpdate&& other) = default;

// static
void UpdateService::SupplyUpdateServiceForTest(UpdateService* service) {}

// static
UpdateService* UpdateService::Get(content::BrowserContext* context) {}

void UpdateService::Shutdown() {}

void UpdateService::SendUninstallPing(const std::string& id,
                                      const base::Version& version,
                                      int reason) {}

void UpdateService::OnCrxStateChange(UpdateFoundCallback update_found_callback,
                                     update_client::CrxUpdateItem item) {}

UpdateService::UpdateService(
    content::BrowserContext* browser_context,
    scoped_refptr<update_client::UpdateClient> update_client)
    :{}

UpdateService::~UpdateService() {}

void UpdateService::StartUpdateCheck(
    const ExtensionUpdateCheckParams& update_params,
    UpdateFoundCallback update_found_callback,
    base::OnceClosure callback) {}

void UpdateService::UpdateCheckComplete(InProgressUpdate update) {}

void UpdateService::AddUpdateClientObserver(
    update_client::UpdateClient::Observer* observer) {}

void UpdateService::RemoveUpdateClientObserver(
    update_client::UpdateClient::Observer* observer) {}

base::Value::Dict UpdateService::GetExtensionOmahaAttributes(
    update_client::CrxUpdateItem& update_item) {}
}  // namespace extensions