#include "components/update_client/crx_cache.h"
#include <cstdint>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "base/sequence_checker.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/task/sequenced_task_runner.h"
#if BUILDFLAG(IS_WIN)
#include "base/strings/utf_string_conversions.h"
#endif
#include "base/task/task_runner.h"
#include "base/task/thread_pool.h"
namespace update_client {
CrxCache::CrxCache(const CrxCache::Options& options)
: … { … }
CrxCache::~CrxCache() = default;
CrxCache::Options::Options(const base::FilePath& crx_cache_root_path)
: … { … }
base::FilePath CrxCache::BuildCrxFilePath(const std::string& id,
const std::string& fp) { … }
bool CrxCache::Contains(const std::string& id, const std::string& fp) { … }
void CrxCache::Get(const std::string& id,
const std::string& fp,
base::OnceCallback<void(const Result& result)> callback) { … }
CrxCache::Result CrxCache::ProcessGet(const std::string& id,
const std::string& fp) { … }
void CrxCache::Put(const base::FilePath& crx_path,
const std::string& id,
const std::string& fp,
base::OnceCallback<void(const Result& result)> callback) { … }
CrxCache::Result CrxCache::ProcessPut(const base::FilePath& crx_path,
const std::string& id,
const std::string& fp) { … }
void CrxCache::RemoveAll(const std::string& id) { … }
UnpackerError CrxCache::MoveFileToCache(const base::FilePath& src_path,
const base::FilePath& dest_path) { … }
void CrxCache::EndRequest(
base::OnceCallback<void(const Result& result)> callback,
CrxCache::Result result) { … }
}