chromium/chrome/browser/extensions/api/image_writer_private/xz_extractor.cc

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

#include "chrome/browser/extensions/api/image_writer_private/xz_extractor.h"

#include <utility>

#include "base/files/file.h"
#include "base/files/file_path.h"
#include "chrome/browser/extensions/api/image_writer_private/error_constants.h"
#include "chrome/browser/file_util_service.h"

// XzExtractor extracts a .tar.xz file. Xz extraction uses third party
// libraries, so actual .tar.xz extraction is performed in a utility process.

namespace extensions {
namespace image_writer {

namespace {

constexpr base::FilePath::StringPieceType kExtractedBinFileName =);

// https://tukaani.org/xz/xz-file-format-1.0.4.txt
constexpr uint8_t kExpectedMagic[6] =;

}  // namespace

bool XzExtractor::IsXzFile(const base::FilePath& image_path) {}

// static
void XzExtractor::Extract(ExtractionProperties properties) {}

XzExtractor::XzExtractor(ExtractionProperties properties)
    :{}

XzExtractor::~XzExtractor() = default;

void XzExtractor::OnProgress(uint64_t total_bytes, uint64_t progress_bytes) {}

void XzExtractor::ExtractImpl() {}

void XzExtractor::OnRemoteFinished(
    chrome::file_util::mojom::ExtractionResult result) {}

void XzExtractor::RunFailureCallbackAndDeleteThis(const std::string& error_id) {}

}  // namespace image_writer
}  // namespace extensions