chromium/components/update_client/update_client_errors.h

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

#ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_
#define COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_

namespace update_client {

// Errors generated as a result of calling UpdateClient member functions.
// These errors are not sent in pings.
enum class Error {};

// These errors are sent in pings. Add new values only to the bottom of
// the enums below; the order must be kept stable.
enum class ErrorCategory {};

// These errors are returned with the `kDownload` error category. This category
// could include other errors such as the errors defined by the Chrome net
// stack.
enum class CrxDownloaderError {};

// These errors are returned with the |kUnpack| error category and
// indicate unpacker or patcher error.
enum class UnpackerError {};

// These errors are returned with the |kInstall| error category and
// are returned by the component installers.
enum class InstallError {};

// These errors are returned with the |kService| error category and
// indicate critical or configuration errors in the update service.
enum class ServiceError {};

// These errors are related to serialization, deserialization, and parsing of
// protocol requests.
// The begin value for this enum is chosen not to conflict with network errors
// defined by net/base/net_error_list.h. The callers don't have to handle this
// error in any meaningful way, but this value may be reported in UMA stats,
// therefore avoiding collisions with known network errors is desirable.
enum class ProtocolError : int {};

struct CategorizedError {};

}  // namespace update_client

#endif  // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_ERRORS_H_