chromium/extensions/browser/install/crx_install_error.cc

// Copyright 2018 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/install/crx_install_error.h"

#include "base/check_op.h"
#include "base/containers/contains.h"
#include "extensions/browser/install/sandboxed_unpacker_failure_reason.h"

namespace extensions {

CrxInstallError::CrxInstallError(CrxInstallErrorType type,
                                 CrxInstallErrorDetail detail,
                                 const std::u16string& message)
    :{}

CrxInstallError::CrxInstallError(CrxInstallErrorType type,
                                 CrxInstallErrorDetail detail)
    :{}

CrxInstallError::CrxInstallError(SandboxedUnpackerFailureReason reason,
                                 const std::u16string& message)
    :{}

CrxInstallError::CrxInstallError(const CrxInstallError& other) = default;
CrxInstallError::CrxInstallError(CrxInstallError&& other) = default;
CrxInstallError& CrxInstallError::operator=(const CrxInstallError& other) =
    default;
CrxInstallError& CrxInstallError::operator=(CrxInstallError&& other) = default;

CrxInstallError::~CrxInstallError() = default;

// For SANDBOXED_UNPACKER_FAILURE type, use sandbox_failure_detail().
CrxInstallErrorDetail CrxInstallError::detail() const {}

// sandbox_failure_detail() only returns a value when the error type is
// SANDBOXED_UNPACKER_FAILURE.
SandboxedUnpackerFailureReason CrxInstallError::sandbox_failure_detail() const {}

// Returns true if the error occurred during crx file verification.
// Use this only if the error type is SANDBOXED_UNPACKER_FAILURE.
bool CrxInstallError::IsCrxVerificationFailedError() const {}

// Returns true if the error occurred during crx installation due to mismatch in
// expectations from the manifest.
bool CrxInstallError::IsCrxExpectationsFailedError() const {}

}  // namespace extensions